Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // hide metatable from Lua getmetatable()
- lua_pushvalue(L, methods);
- set(L, metatable, "__metatable");
- lua_pushvalue(L, methods);
- set(L, metatable, "__index");
- ///////adding this should work
- lua_pushvalue(L, methods);
- set(L, metatable, "__newindex");
- //////////
- lua_pushcfunction(L, tostring_T);
- set(L, metatable, "__tostring");
- lua_pushcfunction(L, gc_T);
- set(L, metatable, "__gc");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement