--- mod_lua_wrap.cpp.orig 2013-11-13 07:48:40.587304736 +0500 +++ mod_lua_wrap.cpp 2013-11-13 07:43:09.059309154 +0500 @@ -6427,7 +6427,7 @@ SWIG_check_num_args("LUA::Session",0,0) result = (LUA::Session *)new LUA::Session(); SWIG_arg=0; - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L); return SWIG_arg; if(0) SWIG_fail; @@ -6455,7 +6455,7 @@ result = (LUA::Session *)new LUA::Session(arg1,arg2); SWIG_arg=0; - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L); return SWIG_arg; if(0) SWIG_fail; @@ -6476,7 +6476,7 @@ arg1 = (char *)lua_tostring(L, 1); result = (LUA::Session *)new LUA::Session(arg1); SWIG_arg=0; - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L); return SWIG_arg; if(0) SWIG_fail; @@ -6501,7 +6501,7 @@ result = (LUA::Session *)new LUA::Session(arg1); SWIG_arg=0; - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L); return SWIG_arg; if(0) SWIG_fail; @@ -7913,7 +7913,7 @@ } #endif -static const struct luaL_reg swig_commands[] = { +static const struct luaL_Reg swig_commands[] = { { "setGlobalVariable", _wrap_setGlobalVariable}, { "getGlobalVariable", _wrap_getGlobalVariable}, { "consoleLog", _wrap_consoleLog}, @@ -8325,7 +8325,7 @@ { int i; /* start with global table */ - lua_pushvalue(L,LUA_GLOBALSINDEX); + lua_pushglobaltable(L); /* SWIG's internal initalisation */ SWIG_InitializeModule((void*)L); SWIG_PropagateClientData();