source:
code/branches/masterserver2/src/external/ceguilua/ceguilua-0.6.2/ceguilua/changes_orxonox.diff
@
8740
Last change on this file since 8740 was 7163, checked in by dafrick, 14 years ago | |
---|---|
|
|
File size: 3.7 KB |
-
CEGUILua.cpp
27 27 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 28 * OTHER DEALINGS IN THE SOFTWARE. 29 29 ***************************************************************************/ 30 #ifdef HAVE_CONFIG_H31 # include "config.h"32 #endif33 34 30 #include "CEGUI.h" 35 31 #include "CEGUIConfig.h" 36 32 #include "CEGUIPropertyHelper.h" … … 45 41 #include "lauxlib.h" 46 42 } 47 43 48 #include "tolua ++.h"44 #include "tolua/tolua++.h" 49 45 50 46 // prototype for bindings initialisation function 51 47 int tolua_CEGUI_open(lua_State* tolua_S); … … 59 55 Constructor (creates Lua state) 60 56 *************************************************************************/ 61 57 LuaScriptModule::LuaScriptModule() : 62 d_errFuncIndex(LUA_NOREF) 58 d_errFuncIndex(LUA_NOREF), 59 d_activeErrFuncIndex(LUA_NOREF) 63 60 { 64 #if CEGUI_LUA_VER >= 5161 #if LUA_VERSION_NUM >= 501 65 62 static const luaL_Reg lualibs[] = { 66 63 {"", luaopen_base}, 67 64 {LUA_LOADLIBNAME, luaopen_package}, … … 75 72 #endif 76 73 {0, 0} 77 74 }; 78 #endif /* CEGUI_LUA_VER >= 51 */75 #endif /* LUA_VERSION_NUM >= 501 */ 79 76 80 77 // create a lua state 81 78 d_ownsState = true; 82 79 d_state = lua_open(); 83 80 84 81 // init all standard libraries 85 #if CEGUI_LUA_VER >= 5182 #if LUA_VERSION_NUM >= 501 86 83 const luaL_Reg *lib = lualibs; 87 84 for (; lib->func; lib++) 88 85 { … … 90 87 lua_pushstring(d_state, lib->name); 91 88 lua_call(d_state, 1, 0); 92 89 } 93 #else /* CEGUI_LUA_VER >= 51 */90 #else /* LUA_VERSION_NUM >= 501 */ 94 91 luaopen_base(d_state); 95 92 luaopen_io(d_state); 96 93 luaopen_string(d_state); … … 99 96 #if defined(DEBUG) || defined (_DEBUG) 100 97 luaopen_debug(d_state); 101 98 #endif 102 #endif /* CEGUI_LUA_VER >= 51 */99 #endif /* LUA_VERSION_NUM >= 501 */ 103 100 104 101 setModuleIdentifierString(); 105 102 } … … 108 105 /************************************************************************* 109 106 Constructor (uses given Lua state) 110 107 *************************************************************************/ 111 LuaScriptModule::LuaScriptModule(lua_State* state) 108 LuaScriptModule::LuaScriptModule(lua_State* state) : 109 d_errFuncIndex(LUA_NOREF), 110 d_activeErrFuncIndex(LUA_NOREF) 112 111 { 113 112 // just use the given state 114 113 d_ownsState = false; -
CEGUILua.h
34 34 /************************************************************************* 35 35 Import / Export control macros 36 36 *************************************************************************/ 37 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI _STATIC)37 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUILUA_STATIC) 38 38 # ifdef CEGUILUA_EXPORTS 39 39 # define CEGUILUA_API __declspec(dllexport) 40 40 # else 41 # define CEGUILUA_API __declspec(dllimport) 41 # if defined( __MINGW32__ ) 42 # define CEGUILUA_API 43 # else 44 # define CEGUILUA_API __declspec(dllimport) 45 # endif 42 46 # endif 43 47 #else 44 48 # define CEGUILUA_API -
CEGUILuaFunctor.cpp
40 40 #include "lauxlib.h" 41 41 } 42 42 43 #include "tolua ++.h"43 #include "tolua/tolua++.h" 44 44 45 45 // Start of CEGUI namespace section 46 46 namespace CEGUI … … 199 199 bool ret = lua_isboolean(L, -1) ? lua_toboolean(L, -1 ) : true; 200 200 lua_pop(L, 1); 201 201 202 // remove error handler from stack 203 if (err_idx != 0) 204 lua_remove(L, err_idx); 205 202 206 if(helper) 203 207 { 204 208 delete helper;
Note: See TracBrowser
for help on using the repository browser.