mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
Add Data:getFFIPointer. Similar to Data:getPointer but returns a cdata pointer directly (or nil if the FFI isn't available).
It should be preferred instead of Data:getPointer because the latter uses lightuserdata which can't store more all possible memory addresses on some new arm64 architectures, when LuaJIT is used.
This commit is contained in:
@@ -141,7 +141,9 @@ const luaL_Reg w_GlyphData_functions[] =
|
||||
|
||||
extern "C" int luaopen_glyphdata(lua_State *L)
|
||||
{
|
||||
return luax_register_type(L, &GlyphData::type, data::w_Data_functions, w_GlyphData_functions, nullptr);
|
||||
int ret = luax_register_type(L, &GlyphData::type, data::w_Data_functions, w_GlyphData_functions, nullptr);
|
||||
love::data::luax_rundatawrapper(L, GlyphData::type);
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // font
|
||||
|
||||
Reference in New Issue
Block a user