aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-01-11 13:47:59 -0500
committerShadowNinja <shadowninja@minetest.net>2014-01-11 13:52:26 -0500
commita9df87ede06f8f0f69e3481cf58f6d59d3f9ebbf (patch)
tree15bdf93980a6cf02ee661dbd139543b5763d5b5b /src
parentbd8ddf1a526c57648028bbee192d92e1289219ac (diff)
downloadminetest-a9df87ede06f8f0f69e3481cf58f6d59d3f9ebbf.tar.gz
minetest-a9df87ede06f8f0f69e3481cf58f6d59d3f9ebbf.tar.bz2
minetest-a9df87ede06f8f0f69e3481cf58f6d59d3f9ebbf.zip
Rename get_json_value to read_json_value
Diffstat (limited to 'src')
-rw-r--r--src/script/common/c_content.cpp4
-rw-r--r--src/script/common/c_content.h2
-rw-r--r--src/script/lua_api/l_util.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index a8f874241..962391a04 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -1088,7 +1088,7 @@ bool push_json_value(lua_State *L, const Json::Value &value, int nullindex)
}
// Converts Lua table --> JSON
-void get_json_value(lua_State *L, Json::Value &root, int index)
+void read_json_value(lua_State *L, Json::Value &root, int index)
{
int type = lua_type(L, index);
if (type == LUA_TBOOLEAN) {
@@ -1104,7 +1104,7 @@ void get_json_value(lua_State *L, Json::Value &root, int index)
while (lua_next(L, index)) {
// Key is at -2 and value is at -1
Json::Value value;
- get_json_value(L, value, lua_gettop(L));
+ read_json_value(L, value, lua_gettop(L));
Json::ValueType roottype = root.type();
int keytype = lua_type(L, -1);
diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h
index 3b85e5403..c2d84ac11 100644
--- a/src/script/common/c_content.h
+++ b/src/script/common/c_content.h
@@ -150,7 +150,7 @@ void luaentity_get (lua_State *L,u16 id);
bool push_json_value (lua_State *L,
const Json::Value &value,
int nullindex);
-void get_json_value (lua_State *L,
+void read_json_value (lua_State *L,
Json::Value &root,
int index);
diff --git a/src/script/lua_api/l_util.cpp b/src/script/lua_api/l_util.cpp
index f9ec94db4..f2bbf181d 100644
--- a/src/script/lua_api/l_util.cpp
+++ b/src/script/lua_api/l_util.cpp
@@ -192,7 +192,7 @@ int ModApiUtil::l_write_json(lua_State *L)
Json::Value root;
try {
- get_json_value(L, root, 1);
+ read_json_value(L, root, 1);
} catch (SerializationError &e) {
lua_pushnil(L);
lua_pushstring(L, e.what());