summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaJson.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-22 20:26:11 +0200
committerGitHub <noreply@github.com>2016-08-22 20:26:11 +0200
commita42033db1cec9e782c69722411c56c87035dd679 (patch)
tree370699cd4ec1ff5905d970005162c8be3aa275dd /src/Bindings/LuaJson.cpp
parentDelay EntityChangedWorld players' callback until Entity fully linked to world (#3330) (diff)
parentcLuaState: Moved function param counting to PushCallPop() template. (diff)
downloadcuberite-a42033db1cec9e782c69722411c56c87035dd679.tar
cuberite-a42033db1cec9e782c69722411c56c87035dd679.tar.gz
cuberite-a42033db1cec9e782c69722411c56c87035dd679.tar.bz2
cuberite-a42033db1cec9e782c69722411c56c87035dd679.tar.lz
cuberite-a42033db1cec9e782c69722411c56c87035dd679.tar.xz
cuberite-a42033db1cec9e782c69722411c56c87035dd679.tar.zst
cuberite-a42033db1cec9e782c69722411c56c87035dd679.zip
Diffstat (limited to 'src/Bindings/LuaJson.cpp')
-rw-r--r--src/Bindings/LuaJson.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Bindings/LuaJson.cpp b/src/Bindings/LuaJson.cpp
index 39a720319..7a0ddb961 100644
--- a/src/Bindings/LuaJson.cpp
+++ b/src/Bindings/LuaJson.cpp
@@ -82,7 +82,7 @@ void PushJsonValue(const Json::Value & a_Value, cLuaState & a_LuaState)
{
case Json::nullValue:
{
- a_LuaState.PushNil();
+ a_LuaState.Push(cLuaState::Nil);
break;
}
@@ -228,8 +228,7 @@ static int tolua_cJson_Parse(lua_State * a_LuaState)
Json::Reader reader;
if (!reader.parse(input, root, false))
{
- L.PushNil();
- L.Push(Printf("Parsing Json failed: %s", reader.getFormattedErrorMessages().c_str()));
+ L.Push(cLuaState::Nil, Printf("Parsing Json failed: %s", reader.getFormattedErrorMessages().c_str()));
return 2;
}