summaryrefslogtreecommitdiff
path: root/src/l_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/l_util.c')
-rw-r--r--src/l_util.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/l_util.c b/src/l_util.c
index 41bfcdd..93c2aec 100644
--- a/src/l_util.c
+++ b/src/l_util.c
@@ -49,15 +49,9 @@ static int get_fd(lua_State *L)
if(!lua_istable(L, -1))
return -1;
- lua_pushliteral(L, "getfd");
+ lua_pushliteral(L, "fd");
lua_gettable(L, -2);
- if(lua_isnil(L, -1)) {
- lua_pop(L,1);
- return -1;
- }
- lua_pushvalue(L, -2); // self
- lua_call(L, 1, 1);
- int fd = luaL_checkint(L, -1);
+ int fd = luaL_checkint(L, -1);
lua_pop(L, 1);
return fd;
}