Skip to content

Commit

Permalink
Rename get_json_value to read_json_value
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowNinja committed Jan 11, 2014
1 parent bd8ddf1 commit a9df87e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/script/common/c_content.cpp
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/script/common/c_content.h
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion src/script/lua_api/l_util.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit a9df87e

Please sign in to comment.