Explorar el Código

Fix build error.

aster2013 hace 11 años
padre
commit
73fad1dc04

+ 3 - 0
Source/Urho3D/LuaScript/LuaScript.cpp

@@ -135,6 +135,9 @@ LuaScript::LuaScript(Context* context) :
 
 
 LuaScript::~LuaScript()
 LuaScript::~LuaScript()
 {
 {
+    functionPointerToFunctionMap_.Clear();
+    functionNameToFunctionMap_.Clear();
+    
     lua_State* luaState = luaState_;
     lua_State* luaState = luaState_;
     luaState_ = 0;
     luaState_ = 0;
 
 

+ 4 - 3
Source/Urho3D/LuaScript/pkgs/LuaScript/LuaScript.pkg

@@ -40,9 +40,9 @@ static bool tolua_isfunctionorurho3dstring(lua_State* L, int lo, int def, tolua_
 static int tolua_LuaScriptLuaAPI_SubscribeToEvent(lua_State* tolua_S)
 static int tolua_LuaScriptLuaAPI_SubscribeToEvent(lua_State* tolua_S)
 {
 {
     int args = lua_gettop(tolua_S);
     int args = lua_gettop(tolua_S);
-
-#ifndef TOLUA_RELEASE    
     tolua_Error tolua_err;
     tolua_Error tolua_err;
+
+#ifndef TOLUA_RELEASE
     if (args == 2)
     if (args == 2)
     {   
     {   
         // SubscribeToEvent(const String eventName, void* functionOrFunctionName);
         // SubscribeToEvent(const String eventName, void* functionOrFunctionName);
@@ -112,8 +112,9 @@ static int tolua_LuaScriptLuaAPI_SubscribeToEvent01(lua_State* tolua_S)
 static int tolua_LuaScriptLuaAPI_UnsubscribeFromEvent(lua_State* tolua_S)
 static int tolua_LuaScriptLuaAPI_UnsubscribeFromEvent(lua_State* tolua_S)
 {
 {
     int args = lua_gettop(tolua_S);
     int args = lua_gettop(tolua_S);
-#ifndef TOLUA_RELEASE    
     tolua_Error tolua_err;
     tolua_Error tolua_err;
+    
+#ifndef TOLUA_RELEASE
     if (args == 1)
     if (args == 1)
     {
     {
         // UnsubscribeFromEvent(const String eventName);
         // UnsubscribeFromEvent(const String eventName);