summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaJson.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-16 13:02:08 +0200
committerMattes D <github@xoft.cz>2016-08-22 20:09:56 +0200
commit9493488e48c49a54e9b1ec892107735de6736c13 (patch)
treee8f2756003714cf54ebda9168016130b5c0a1432 /src/Bindings/LuaJson.cpp
parentcLuaState: Added support for optional params and AStringMap values. (diff)
downloadcuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar
cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.gz
cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.bz2
cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.lz
cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.xz
cuberite-9493488e48c49a54e9b1ec892107735de6736c13.tar.zst
cuberite-9493488e48c49a54e9b1ec892107735de6736c13.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;
}