| 765 | |
| 766 | |
| 767 | uint32_t RegisterUserTypeLocal(lua_State* L, const char* name, const luaL_reg meta[]) |
| 768 | { |
| 769 | DM_LUA_STACK_CHECK(L, 0); |
| 770 | |
| 771 | luaL_newmetatable(L, name); |
| 772 | uint32_t type_hash = SetUserType(L, -1, name); |
| 773 | |
| 774 | luaL_register (L, 0, meta); |
| 775 | lua_pushvalue(L, -1); |
| 776 | lua_setfield(L, -1, "__index"); |
| 777 | lua_pop(L, 1); |
| 778 | |
| 779 | return type_hash; |
| 780 | } |
| 781 | |
| 782 | |
| 783 | uint32_t RegisterUserType(lua_State* L, const char* name, const luaL_reg methods[], const luaL_reg meta[]) { |
nothing calls this directly
no test coverage detected