summaryrefslogtreecommitdiffstats
path: root/lem
diff options
context:
space:
mode:
Diffstat (limited to 'lem')
-rw-r--r--lem/http/core.c2
-rw-r--r--lem/io/core.c4
-rw-r--r--lem/io/file.c4
-rw-r--r--lem/io/stream.c14
-rw-r--r--lem/lfs/core.c24
-rw-r--r--lem/signal/core.c6
6 files changed, 27 insertions, 27 deletions
diff --git a/lem/http/core.c b/lem/http/core.c
index e9a6628..da18ba6 100644
--- a/lem/http/core.c
+++ b/lem/http/core.c
@@ -274,7 +274,7 @@ parse_http_process(lua_State *T, struct lem_inputbuf *b)
n += b->buf[k] - '0';
}
- lua_pushnumber(T, n);
+ lua_pushinteger(T, n);
}
lua_setfield(T, -2, "status");
w = 0;
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)
diff --git a/lem/lfs/core.c b/lem/lfs/core.c
index cbb451f..087a27c 100644
--- a/lem/lfs/core.c
+++ b/lem/lfs/core.c
@@ -391,20 +391,20 @@ static void
lfs_attr_push(lua_State *T, struct stat *st, int i)
{
switch (i) {
- case 0: lua_pushnumber(T, st->st_dev); break;
- case 1: lua_pushnumber(T, st->st_ino); break;
+ case 0: lua_pushinteger(T, st->st_dev); break;
+ case 1: lua_pushinteger(T, st->st_ino); break;
case 2: lfs_attr_pushmode(T, st->st_mode); break;
case 3: lfs_attr_pushperm(T, st->st_mode); break;
- case 4: lua_pushnumber(T, st->st_nlink); break;
- case 5: lua_pushnumber(T, st->st_uid); break;
- case 6: lua_pushnumber(T, st->st_gid); break;
- case 7: lua_pushnumber(T, st->st_rdev); break;
- case 8: lua_pushnumber(T, st->st_size); break;
- case 9: lua_pushnumber(T, st->st_blksize); break;
- case 10: lua_pushnumber(T, st->st_blocks); break;
- case 11: lua_pushnumber(T, st->st_atime); break;
- case 12: lua_pushnumber(T, st->st_mtime); break;
- case 13: lua_pushnumber(T, st->st_ctime); break;
+ case 4: lua_pushinteger(T, st->st_nlink); break;
+ case 5: lua_pushinteger(T, st->st_uid); break;
+ case 6: lua_pushinteger(T, st->st_gid); break;
+ case 7: lua_pushinteger(T, st->st_rdev); break;
+ case 8: lua_pushinteger(T, st->st_size); break;
+ case 9: lua_pushinteger(T, st->st_blksize); break;
+ case 10: lua_pushinteger(T, st->st_blocks); break;
+ case 11: lua_pushinteger(T, st->st_atime); break;
+ case 12: lua_pushinteger(T, st->st_mtime); break;
+ case 13: lua_pushinteger(T, st->st_ctime); break;
}
}
diff --git a/lem/signal/core.c b/lem/signal/core.c
index 45be7fc..695f9d6 100644
--- a/lem/signal/core.c
+++ b/lem/signal/core.c
@@ -290,7 +290,7 @@ signal_tonumber(lua_State *T)
static int
signal_tostring(lua_State *T)
{
- int needle = luaL_checkint(T, 1);
+ int needle = luaL_checkinteger(T, 1);
unsigned int i;
for (i = 0; i < ARRAYLEN(sigmap); i++) {
@@ -326,7 +326,7 @@ signal_sethandler(lua_State *T)
static int
signal_watch(lua_State *T)
{
- int sig = luaL_checkint(T, 1);
+ int sig = luaL_checkinteger(T, 1);
lua_settop(T, 1);
lua_pushlightuserdata(T, &sigmap);
@@ -343,7 +343,7 @@ signal_watch(lua_State *T)
static int
signal_unwatch(lua_State *T)
{
- int sig = luaL_checkint(T, 1);
+ int sig = luaL_checkinteger(T, 1);
if (sig == SIGCHLD)
return signal_child_unwatch(T);