- GetMeter dynamically detects STRING meters now (no need to use tolua.cast any longer)
- Removed unneeded (and undocumented) functions to exposed to Lua
- Refactored tolua++ generated code
This commit is contained in:
Birunthan Mohanathas
2011-07-05 13:41:05 +00:00
parent 9a9edbda2e
commit c7f9293e9c
29 changed files with 1154 additions and 4688 deletions

View File

@ -0,0 +1,24 @@
#include "../../StdAfx.h"
#include "../LuaManager.h"
#include "../../Litestep.h"
static int Global_Log(lua_State* L)
{
const char* str = tolua_tostring(L, 1, 0);
LuaManager::LuaLog(LOG_NOTICE, str);
return 0;
}
static const luaL_reg TO_funcs[] =
{
{ "LuaLog", Global_Log }, { NULL, NULL }
};
void LuaManager::RegisterGlobal(lua_State* L)
{
lua_register(L, "print", Global_Log);
luaL_register(L, "TO", TO_funcs); // For backwards compatibility
}