Added new tangible ops, including tangible.delete
This commit is contained in:
@@ -125,16 +125,7 @@ LuaDefine(table_count, "c") {
|
||||
LuaDefine(table_clear, "c") {
|
||||
LuaArg tab;
|
||||
LuaStack LS(L, tab);
|
||||
|
||||
LS.checktable(tab);
|
||||
lua_pushnil(L);
|
||||
while (lua_next(L, tab.index()) != 0) {
|
||||
lua_pop(L, 1); // Pop the old value.
|
||||
lua_pushvalue(L, -1); // Clone the key
|
||||
lua_pushnil(L); // Push the new value.
|
||||
lua_settable(L, tab.index());
|
||||
}
|
||||
|
||||
LS.cleartable(tab);
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user