|
First thought is that you haven't called luaopen_display_lib before createGlobal, so the metatable doesn't exist yet. Try the following assertion: luaL_getmetatable(L, GEMINI_LINE_LUA_KEY); assert(lua_type(L, -1) == LUA_TTABLE); lua_setmetatable(L, -2); Thanks, Kev