diff options
Diffstat (limited to 'lib/BLua.cc')
-rw-r--r-- | lib/BLua.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/BLua.cc b/lib/BLua.cc index bdb35d2..7ee0bc4 100644 --- a/lib/BLua.cc +++ b/lib/BLua.cc @@ -219,12 +219,20 @@ void Lua::newtable() { lua_newtable(L);
}
-void Lua::settable(int i) {
- lua_settable(L, i);
+void Lua::settable(int i, bool raw) {
+ if (raw) {
+ lua_rawset(L, i);
+ } else {
+ lua_settable(L, i);
+ }
}
-void Lua::gettable(int i) {
- lua_gettable(L, i);
+void Lua::gettable(int i, bool raw) {
+ if (raw) {
+ lua_rawget(L, i);
+ } else {
+ lua_gettable(L, i);
+ }
}
int Lua::gettop() {
|