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:
Alex Szpakowski
2019-07-20 10:47:58 -03:00
parent d700800888
commit cb4b45dcf1
17 changed files with 170 additions and 64 deletions
@@ -116,7 +116,9 @@ static const luaL_Reg w_CompressedImageData_functions[] =
extern "C" int luaopen_compressedimagedata(lua_State *L)
{
return luax_register_type(L, &CompressedImageData::type, data::w_Data_functions, w_CompressedImageData_functions, nullptr);
int ret = luax_register_type(L, &CompressedImageData::type, data::w_Data_functions, w_CompressedImageData_functions, nullptr);
love::data::luax_rundatawrapper(L, CompressedImageData::type);
return ret;
}
} // image