ohh, that word 'index' was key
This commit is contained in:
parent
ac6c9319f9
commit
ffaf456654
|
@ -112,6 +112,10 @@ static const luaL_Reg curses_window_methods[] =
|
|||
|
||||
LUALIB_API int luaopen_curses (lua_State *L) {
|
||||
luaL_newmetatable(L, "curses:window");
|
||||
/* metatable.__index = metatable */
|
||||
lua_pushstring(L, "__index");
|
||||
lua_pushvalue(L, -2);
|
||||
lua_settable(L, -3);
|
||||
luaL_register(L, NULL, curses_window_methods);
|
||||
luaL_register(L, "curses", curseslib);
|
||||
/* save main window on registry */
|
||||
|
|
Loading…
Reference in New Issue