diff options
Diffstat (limited to 'include/BLua.h')
-rw-r--r-- | include/BLua.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/BLua.h b/include/BLua.h index 5d61dc1..f1401fd 100644 --- a/include/BLua.h +++ b/include/BLua.h @@ -70,6 +70,8 @@ class Lua : public Base { Lua(const Lua &) throw (GeneralException); virtual ~Lua(); typedef int (*lua_CallWrapper)(lua_State *, lua_CFunction); + int ref(int t = -2) { luaL_ref(L, t); } + void unref(int ref, int t = -1) { luaL_unref(L, t, ref); } void open_base(); void open_table(); void open_io(bool safe = true); @@ -102,6 +104,8 @@ class Lua : public Base { void * newuser(size_t s) { checkstack(); return lua_newuserdata(L, s); } void settable(int = -3, bool raw = false); void gettable(int = -2, bool raw = false); + void rawseti(int i, int t = -2) { lua_rawseti(L, t, i); } + void rawgeti(int i, int t = -1) { lua_rawgeti(L, t, i); } void setvar() { lua_settable(L, LUA_GLOBALSINDEX); } int gettop() { return lua_gettop(L); } void getglobal(const String &) throw (GeneralException); |