CoronaLuaPushUserdata()

Revision Release 2021.3646
Keywords iOS, Solar2D Native, C, CoronaLua.h, CoronaLuaPushUserdata
See also CoronaLua.h
Corona C Functions

Overview

Wraps the pointer ud in a Lua userdata object and sets the userdata's metatable to metatableName.

Important

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.

Syntax

void CoronaLuaPushUserdata( lua_State* L, void* ud, const char metatableName[] )