Get rid of getfield/setfield
This commit is contained in:
@@ -504,17 +504,17 @@ public:
|
||||
lua_rawset(L_, tab);
|
||||
}
|
||||
|
||||
template<typename VT>
|
||||
void setfield(LuaSlot tab, const char *field, VT value) const {
|
||||
push_any_value(value);
|
||||
lua_setfield(L_, tab, field);
|
||||
}
|
||||
// template<typename VT>
|
||||
// void rawset(LuaSlot tab, const char *field, VT value) const {
|
||||
// push_any_value(value);
|
||||
// lua_rawset(L_, tab, field);
|
||||
// }
|
||||
|
||||
template<typename RT>
|
||||
void getfield(RT &target, LuaSlot tab, const char *field) const {
|
||||
lua_getfield(L_, tab, field);
|
||||
pop_any_value(target);
|
||||
}
|
||||
// template<typename RT>
|
||||
// void rawget(RT &target, LuaSlot tab, const char *field) const {
|
||||
// lua_rawget(L_, tab, field);
|
||||
// pop_any_value(target);
|
||||
// }
|
||||
|
||||
// Call invokes any C function. It pushes the arguments on the stack,
|
||||
// calls the cfunction, verifies that the number of return values is as
|
||||
|
||||
Reference in New Issue
Block a user