summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src/process.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2009-11-28 10:24:19 +0000
committerSteven Barth <steven@midlink.org>2009-11-28 10:24:19 +0000
commit87491bf031881a4f5b828aaf6826cf98bda1252e (patch)
treea67086f36d95dbac5ea02f3c06ecf827fa171fbf /libs/nixio/src/process.c
parent7f9c9d208e2465e80cba92dcc8d450022a8cfd1e (diff)
nixio: Improve number handling with non-double Lua setups
Diffstat (limited to 'libs/nixio/src/process.c')
-rw-r--r--libs/nixio/src/process.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libs/nixio/src/process.c b/libs/nixio/src/process.c
index f3bb2f400..45c06a644 100644
--- a/libs/nixio/src/process.c
+++ b/libs/nixio/src/process.c
@@ -225,16 +225,16 @@ static int nixio_times(lua_State *L) {
return nixio__perror(L);
} else {
lua_createtable(L, 0, 4);
- lua_pushinteger(L, buf.tms_cstime);
+ nixio__pushnumber(L, buf.tms_cstime);
lua_setfield(L, -2, "cstime");
- lua_pushinteger(L, buf.tms_cutime);
+ nixio__pushnumber(L, buf.tms_cutime);
lua_setfield(L, -2, "cutime");
- lua_pushinteger(L, buf.tms_stime);
+ nixio__pushnumber(L, buf.tms_stime);
lua_setfield(L, -2, "stime");
- lua_pushinteger(L, buf.tms_utime);
+ nixio__pushnumber(L, buf.tms_utime);
lua_setfield(L, -2, "utime");
return 1;
@@ -365,16 +365,16 @@ static int nixio_sysinfo(lua_State *L) {
lua_createtable(L, 0, 12);
- lua_pushinteger(L, info.bufferram);
+ nixio__pushnumber(L, info.bufferram);
lua_setfield(L, -2, "bufferram");
- lua_pushinteger(L, info.freehigh);
+ nixio__pushnumber(L, info.freehigh);
lua_setfield(L, -2, "freehigh");
- lua_pushinteger(L, info.freeram);
+ nixio__pushnumber(L, info.freeram);
lua_setfield(L, -2, "freeram");
- lua_pushinteger(L, info.freeswap);
+ nixio__pushnumber(L, info.freeswap);
lua_setfield(L, -2, "freeswap");
lua_createtable(L, 0, 3);
@@ -390,16 +390,16 @@ static int nixio_sysinfo(lua_State *L) {
lua_pushinteger(L, info.procs);
lua_setfield(L, -2, "procs");
- lua_pushinteger(L, info.sharedram);
+ nixio__pushnumber(L, info.sharedram);
lua_setfield(L, -2, "sharedram");
- lua_pushinteger(L, info.totalhigh);
+ nixio__pushnumber(L, info.totalhigh);
lua_setfield(L, -2, "totalhigh");
- lua_pushinteger(L, info.totalram);
+ nixio__pushnumber(L, info.totalram);
lua_setfield(L, -2, "totalram");
- lua_pushinteger(L, info.totalswap);
+ nixio__pushnumber(L, info.totalswap);
lua_setfield(L, -2, "totalswap");
lua_pushinteger(L, info.uptime);