summaryrefslogtreecommitdiffstats
path: root/lem/io
diff options
context:
space:
mode:
Diffstat (limited to 'lem/io')
-rw-r--r--lem/io/core.c4
-rw-r--r--lem/io/file.c4
-rw-r--r--lem/io/stream.c14
3 files changed, 11 insertions, 11 deletions
diff --git a/lem/io/core.c b/lem/io/core.c
index 1ec3843..4844bac 100644
--- a/lem/io/core.c
+++ b/lem/io/core.c
@@ -348,7 +348,7 @@ io_fromfd_reap(struct lem_async *a)
static int
io_fromfd(lua_State *T)
{
- int fd = luaL_checkint(T, 1);
+ int fd = luaL_checkinteger(T, 1);
struct fromfd *ff;
if (fd < 0)
@@ -425,7 +425,7 @@ io_popen(lua_State *T)
posix_spawn_file_actions_destroy(&fa);
close(fd[1]);
stream_new(T, fd[0], lua_upvalueindex(1));
- lua_pushnumber(T, pid);
+ lua_pushinteger(T, pid);
return 2;
error:
posix_spawn_file_actions_destroy(&fa);
diff --git a/lem/io/file.c b/lem/io/file.c
index 471b4a0..9d54fcb 100644
--- a/lem/io/file.c
+++ b/lem/io/file.c
@@ -360,7 +360,7 @@ file_size_reap(struct lem_async *a)
return;
}
- lua_pushnumber(T, f->size.val);
+ lua_pushinteger(T, f->size.val);
lem_queue(T, 1);
}
@@ -413,7 +413,7 @@ file_seek_reap(struct lem_async *a)
return;
}
- lua_pushnumber(T, f->seek.offset);
+ lua_pushinteger(T, f->seek.offset);
lem_queue(T, 1);
}
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)