From 913db8773d23f6529e14df3db03067f822ef5aca Mon Sep 17 00:00:00 2001 From: jyelon Date: Fri, 17 Dec 2021 16:32:05 -0500 Subject: [PATCH] eris: remove luaB_nkeys and luaB_nthkey --- luprex/eris-master/src/lbaselib.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/luprex/eris-master/src/lbaselib.c b/luprex/eris-master/src/lbaselib.c index 8c5675d6..e24c6572 100644 --- a/luprex/eris-master/src/lbaselib.c +++ b/luprex/eris-master/src/lbaselib.c @@ -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},