summaryrefslogtreecommitdiffstats
path: root/lem/io/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'lem/io/stream.c')
-rw-r--r--lem/io/stream.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lem/io/stream.c b/lem/io/stream.c
index a8ab4d2..47a5775 100644
--- a/lem/io/stream.c
+++ b/lem/io/stream.c
@@ -389,8 +389,8 @@ stream_getpeer(lua_State *T)
}
lua_pushliteral(T, "*unix");
- lua_pushnumber(T, cred.cr_uid);
- lua_pushnumber(T, cred.cr_gid);
+ lua_pushinteger(T, cred.cr_uid);
+ lua_pushinteger(T, cred.cr_gid);
#else
struct ucred cred;
@@ -399,8 +399,8 @@ stream_getpeer(lua_State *T)
return io_strerror(T, errno);
lua_pushliteral(T, "*unix");
- lua_pushnumber(T, cred.uid);
- lua_pushnumber(T, cred.gid);
+ lua_pushinteger(T, cred.uid);
+ lua_pushinteger(T, cred.gid);
#endif
return 3;
}
@@ -413,7 +413,7 @@ stream_getpeer(lua_State *T)
return io_strerror(T, errno);
lua_pushstring(T, buf);
- lua_pushnumber(T, ntohs(addr.in.sin_port));
+ lua_pushinteger(T, ntohs(addr.in.sin_port));
return 2;
}
@@ -425,7 +425,7 @@ stream_getpeer(lua_State *T)
return io_strerror(T, errno);
lua_pushstring(T, buf);
- lua_pushnumber(T, ntohs(addr.in6.sin6_port));
+ lua_pushinteger(T, ntohs(addr.in6.sin6_port));
return 2;
}
}
@@ -504,7 +504,7 @@ stream_sendfile_reap(struct lem_async *a)
int ret;
if (sf->ret == 0) {
- lua_pushnumber(T, sf->size);
+ lua_pushinteger(T, sf->size);
ret = 1;
} else {
if (s->open)