lua_getfield(L, idx, "network");
(void)str2prefix(lua_tostring(L, -1), prefix);
lua_pop(L, 1);
+ /* pop the table */
+ lua_pop(L, 1);
}
void *lua_toprefix(lua_State *L, int idx)
lua_getfield(L, idx, "linklayer_type");
ifp->ll_type = lua_tointeger(L, -1);
lua_pop(L, 1);
+ /* pop the table */
+ lua_pop(L, 1);
}
void *lua_tointerface(lua_State *L, int idx)
{
lua_getfield(L, idx, "value");
inaddr->s_addr = lua_tointeger(L, -1);
lua_pop(L, 1);
+ /* pop the table */
+ lua_pop(L, 1);
}
void *lua_toinaddr(lua_State *L, int idx)
lua_getfield(L, idx, "string");
inet_pton(AF_INET6, lua_tostring(L, -1), in6addr);
lua_pop(L, 1);
+ /* pop the table */
+ lua_pop(L, 1);
}
void *lua_toin6addr(lua_State *L, int idx)
{
lua_getfield(L, idx, "string");
str2sockunion(lua_tostring(L, -1), su);
+ lua_pop(L, 1);
+ /* pop the table */
+ lua_pop(L, 1);
}
void *lua_tosockunion(lua_State *L, int idx)
void lua_decode_timet(lua_State *L, int idx, time_t *t)
{
*t = lua_tointeger(L, idx);
+ lua_pop(L, 1);
}
void *lua_totimet(lua_State *L, int idx)
{
int isnum;
*num = lua_tonumberx(L, idx, &isnum);
+ lua_pop(L, 1);
assert(isnum);
}