eris: remove luaB_nkeys and luaB_nthkey

This commit is contained in:
2021-12-17 16:32:05 -05:00
parent 227a754b21
commit 913db8773d

View File

@@ -209,27 +209,6 @@ static int pairsmeta (lua_State *L, const char *method, int iszero,
return 3;
}
static int luaB_nkeys (lua_State *L) {
luaL_checktype(L, 1, LUA_TTABLE);
int n = lua_nkeys(L, 1);
lua_pop(L, 1);
lua_pushinteger(L, n);
return 1;
}
static int luaB_nthkey (lua_State *L) {
luaL_checktype(L, 1, LUA_TTABLE);
int n = luaL_checkint(L, 2);
if (lua_nthkey(L, 1, n)) {
return 2;
} else {
return 0;
}
}
static int luaB_next (lua_State *L) {
luaL_checktype(L, 1, LUA_TTABLE);
lua_settop(L, 2); /* create a 2nd argument if there isn't one */
@@ -456,8 +435,6 @@ static const luaL_Reg base_funcs[] = {
{"loadstring", luaB_load},
#endif
{"next", luaB_next},
{"nkeys", luaB_nkeys},
{"nthkey", luaB_nthkey},
{"pairs", luaB_pairs},
{"rawpairs", luaB_rawpairs},
{"pcall", luaB_pcall},