Table
関数getValue()
、などを含むグローバルテーブルがある場合setValue()
、への参照を格納できますか、Table.getValue
またはへの参照を格納してからTable
メンバー関数を呼び出す必要がありますか?
lua_getglobal(L, "Table");
lua_getfield(L, -1, "getValue");
getValueRef = luaL_ref(L, LUA_REGISTRYINDEX);
lua_getfield(L, -1, "setValue");
setValueRef = luaL_ref(L, LUA_REGISTRYINDEX);
lua_pop(L, 1); // Pop "Table" off of the stack