merge LuaFunctions.h into LuaManager.h

This commit is contained in:
Glenn Maynard
2006-09-29 09:31:41 +00:00
parent 85eb3e0a05
commit dcc1cb0d86
2 changed files with 15 additions and 15 deletions
-15
View File
@@ -3,21 +3,6 @@
#include "LuaManager.h"
/* Linked list of functions we make available to Lua. */
struct LuaFunctionList
{
LuaFunctionList( RString name, lua_CFunction func );
RString name;
lua_CFunction func;
LuaFunctionList *next;
};
#define LuaFunction( func, expr ) \
int LuaFunc_##func( lua_State *L ) { \
LuaHelpers::Push( L, expr ); return 1; \
} \
static LuaFunctionList g_##func( #func, LuaFunc_##func ); /* register it */
#endif
/*
+15
View File
@@ -141,6 +141,21 @@ inline bool MyLua_checkboolean (lua_State *L, int numArg)
#define BArg(n) (MyLua_checkboolean(L,(n)))
#define FArg(n) ((float) luaL_checknumber(L,(n)))
/* Linked list of functions we make available to Lua. */
struct LuaFunctionList
{
LuaFunctionList( RString name, lua_CFunction func );
RString name;
lua_CFunction func;
LuaFunctionList *next;
};
#define LuaFunction( func, expr ) \
int LuaFunc_##func( lua_State *L ) { \
LuaHelpers::Push( L, expr ); return 1; \
} \
static LuaFunctionList g_##func( #func, LuaFunc_##func ); /* register it */
#endif
/*