summaryrefslogtreecommitdiffstats
path: root/source/ManualBindings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/ManualBindings.cpp')
-rw-r--r--source/ManualBindings.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/source/ManualBindings.cpp b/source/ManualBindings.cpp
index 9e9b5f5a8..141335602 100644
--- a/source/ManualBindings.cpp
+++ b/source/ManualBindings.cpp
@@ -19,13 +19,14 @@
#include "BlockEntities/FurnaceEntity.h"
#include "md5/md5.h"
#include "LuaWindow.h"
+#include "LuaState.h"
// fwd: LuaCommandBinder.cpp
-bool report_errors(lua_State* lua, int status);
+// bool cLuaState::ReportErrors(lua_State* lua, int status);
@@ -233,7 +234,7 @@ static int tolua_DoWith(lua_State* tolua_S)
}
int s = lua_pcall(LuaState, (TableRef == LUA_REFNIL ? 1 : 2), 1, 0);
- if (report_errors(LuaState, s))
+ if (cLuaState::ReportErrors(LuaState, s))
{
return true; // Abort enumeration
}
@@ -323,7 +324,7 @@ static int tolua_DoWithID(lua_State* tolua_S)
}
int s = lua_pcall(LuaState, (TableRef == LUA_REFNIL ? 1 : 2), 1, 0);
- if (report_errors(LuaState, s))
+ if (cLuaState::ReportErrors(LuaState, s))
{
return true; // Abort enumeration
}
@@ -418,7 +419,7 @@ static int tolua_DoWithXYZ(lua_State* tolua_S)
}
int s = lua_pcall(LuaState, (TableRef == LUA_REFNIL ? 1 : 2), 1, 0);
- if (report_errors(LuaState, s))
+ if (cLuaState::ReportErrors(LuaState, s))
{
return true; // Abort enumeration
}
@@ -511,7 +512,7 @@ static int tolua_ForEachInChunk(lua_State* tolua_S)
}
int s = lua_pcall(LuaState, (TableRef == LUA_REFNIL ? 1 : 2), 1, 0);
- if (report_errors(LuaState, s))
+ if (cLuaState::ReportErrors(LuaState, s))
{
return true; /* Abort enumeration */
}
@@ -602,7 +603,7 @@ static int tolua_ForEach(lua_State * tolua_S)
}
int s = lua_pcall(LuaState, (TableRef == LUA_REFNIL ? 1 : 2), 1, 0);
- if (report_errors(LuaState, s))
+ if (cLuaState::ReportErrors(LuaState, s))
{
return true; /* Abort enumeration */
}
@@ -813,7 +814,7 @@ static int tolua_cPluginManager_ForEachCommand(lua_State * tolua_S)
tolua_pushcppstring(LuaState, a_HelpString);
int s = lua_pcall(LuaState, 3, 1, 0);
- if (report_errors(LuaState, s))
+ if (cLuaState::ReportErrors(LuaState, s))
{
return true; /* Abort enumeration */
}
@@ -887,7 +888,7 @@ static int tolua_cPluginManager_ForEachConsoleCommand(lua_State * tolua_S)
tolua_pushcppstring(LuaState, a_HelpString);
int s = lua_pcall(LuaState, 2, 1, 0);
- if (report_errors(LuaState, s))
+ if (cLuaState::ReportErrors(LuaState, s))
{
return true; /* Abort enumeration */
}
@@ -1307,8 +1308,8 @@ static int tolua_cPlugin_Call(lua_State* tolua_S)
return 0;
}
- int s = lua_pcall(targetState, top-2, LUA_MULTRET, 0);
- if( report_errors( targetState, s ) )
+ int s = lua_pcall(targetState, top - 2, LUA_MULTRET, 0);
+ if (cLuaState::ReportErrors(targetState, s))
{
LOGWARN("Error while calling function '%s' in plugin '%s'", funcName.c_str(), self->GetName().c_str() );
return 0;