summaryrefslogtreecommitdiff
path: root/library/LuaTypes.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-03-31 12:11:43 +0400
committerAlexander Gavrilov2012-03-31 12:11:43 +0400
commit9384f0c842f817bf810b34e44bfa3be913e7e3fc (patch)
treee5c69e7f4492ad4b8983e458471ac904a5364d88 /library/LuaTypes.cpp
parent10b610669fe90bbe32ca412e74234b74d1293f6c (diff)
downloaddfhack-9384f0c842f817bf810b34e44bfa3be913e7e3fc.tar.gz
dfhack-9384f0c842f817bf810b34e44bfa3be913e7e3fc.tar.bz2
dfhack-9384f0c842f817bf810b34e44bfa3be913e7e3fc.tar.xz
Update lua to 5.2 and fix obvious breakage due to obsolete api.
Diffstat (limited to 'library/LuaTypes.cpp')
-rw-r--r--library/LuaTypes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/LuaTypes.cpp b/library/LuaTypes.cpp
index 8b297453..550dc239 100644
--- a/library/LuaTypes.cpp
+++ b/library/LuaTypes.cpp
@@ -643,7 +643,7 @@ static int meta_struct_next(lua_State *state)
{
if (lua_gettop(state) < 2) lua_pushnil(state);
- int len = lua_objlen(state, UPVAL_FIELDTABLE);
+ int len = lua_rawlen(state, UPVAL_FIELDTABLE);
int idx = cur_iter_index(state, len+1, 2, 0);
if (idx == len)
return 0;
@@ -1053,7 +1053,7 @@ static void IndexFields(lua_State *state, int base, struct_identity *pstruct)
if (!fields)
return;
- int cnt = lua_objlen(state, base+3); // field iter table
+ int cnt = lua_rawlen(state, base+3); // field iter table
for (int i = 0; fields[i].mode != struct_field_info::END; ++i)
{