use REGISTER_WITH_LUA_FUNCTION instead of a separate registration mechanism
This commit is contained in:
@@ -199,7 +199,8 @@ struct LuaFunctionList
|
||||
int LuaFunc_##func( lua_State *L ) { \
|
||||
LuaHelpers::Push( L, expr ); return 1; \
|
||||
} \
|
||||
static LuaFunctionList g_##func( #func, LuaFunc_##func ); /* register it */
|
||||
void LuaFunc_Register_##func( lua_State *L ) { lua_register( L, #func, LuaFunc_##func ); } \
|
||||
REGISTER_WITH_LUA_FUNCTION( LuaFunc_Register_##func );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user