summaryrefslogtreecommitdiff
path: root/src/scripting/luautil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripting/luautil.h')
-rw-r--r--src/scripting/luautil.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/scripting/luautil.h b/src/scripting/luautil.h
index ee4ac315..2395f211 100644
--- a/src/scripting/luautil.h
+++ b/src/scripting/luautil.h
@@ -202,9 +202,8 @@ template <typename T> void pushSTLContainer(lua_State *s, const std::list<T> &co
for (int key = 1; key <= len; key++)
{
- push(s, key);
push(s, *i);
- lua_settable(s, table);
+ lua_rawseti(s, table, key);
i++;
}
}
@@ -218,9 +217,8 @@ template <typename T> void pushSTLContainer(lua_State *s, const std::vector<T> &
for (int key = 0; key < len; key++)
{
- push(s, key+1);
push(s, container.at(key));
- lua_settable(s, table);
+ lua_rawseti(s, table, key + 1);
}
}
@@ -253,9 +251,8 @@ template <typename T> void pushSTLContainer(lua_State *s, const std::set<T> &con
for (int key = 1; key <= len; key++)
{
- push(s, key);
push(s, *i);
- lua_settable(s, table);
+ lua_rawseti(s, table, key);
i++;
}
}