eris: remove luaB_nkeys and luaB_nthkey
This commit is contained in:
@@ -209,27 +209,6 @@ static int pairsmeta (lua_State *L, const char *method, int iszero,
|
|||||||
return 3;
|
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) {
|
static int luaB_next (lua_State *L) {
|
||||||
luaL_checktype(L, 1, LUA_TTABLE);
|
luaL_checktype(L, 1, LUA_TTABLE);
|
||||||
lua_settop(L, 2); /* create a 2nd argument if there isn't one */
|
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},
|
{"loadstring", luaB_load},
|
||||||
#endif
|
#endif
|
||||||
{"next", luaB_next},
|
{"next", luaB_next},
|
||||||
{"nkeys", luaB_nkeys},
|
|
||||||
{"nthkey", luaB_nthkey},
|
|
||||||
{"pairs", luaB_pairs},
|
{"pairs", luaB_pairs},
|
||||||
{"rawpairs", luaB_rawpairs},
|
{"rawpairs", luaB_rawpairs},
|
||||||
{"pcall", luaB_pcall},
|
{"pcall", luaB_pcall},
|
||||||
|
|||||||
Reference in New Issue
Block a user