From df9d0d88a17ed81f394e76d336657e5a180c0c36 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 21 Oct 2009 12:25:48 +0200 Subject: Move more utility code from dlua to cluautil. --- crawl-ref/source/dlua.cc | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'crawl-ref/source/dlua.cc') diff --git a/crawl-ref/source/dlua.cc b/crawl-ref/source/dlua.cc index 5aae875edc..cac5941566 100644 --- a/crawl-ref/source/dlua.cc +++ b/crawl-ref/source/dlua.cc @@ -13,28 +13,6 @@ #include "tags.h" -template -static int dlua_gentable(lua_State *ls, const list &strings, lpush push) -{ - lua_newtable(ls); - for (int i = 0, size = strings.size(); i < size; ++i) - { - push(ls, strings[i]); - lua_rawseti(ls, -2, i + 1); - } - return (1); -} - -inline static void dlua_pushcxxstring(lua_State *ls, const std::string &s) -{ - lua_pushstring(ls, s.c_str()); -} - -int dlua_stringtable(lua_State *ls, const std::vector &s) -{ - return dlua_gentable(ls, s, dlua_pushcxxstring); -} - static int dlua_compiled_chunk_writer(lua_State *ls, const void *p, size_t sz, void *ud) { -- cgit v1.2.3-54-g00ecf