Revision Release 2024.3703 Keywords iOS, Solar2D Native, C, CoronaLua.h, CoronaLuaPushUserdata See also CoronaLua.h Corona C Functions
Wraps the pointer ud
in a Lua userdata object and sets the userdata’s metatable to metatableName
.
This assumes that there will be only one Lua instance of the userdata. In other words, when the garbage collector collects the ud
, ud
will get deleted.
void CoronaLuaPushUserdata( lua_State* L, void* ud, const char metatableName[] )