Implement helpful __tostring for all userdata-based classes

This commit is contained in:
Lars Mueller
2025-04-27 17:27:55 +02:00
committed by Lars Müller
parent 9ad23e4384
commit 747857bffa
22 changed files with 103 additions and 66 deletions

View File

@@ -330,7 +330,7 @@ void LuaAreaStore::Register(lua_State *L)
{"__gc", gc_object},
{0, 0}
};
registerClass(L, className, methods, metamethods);
registerClass<LuaAreaStore>(L, methods, metamethods);
// Can be created from Lua (AreaStore())
lua_register(L, className, create_object);