aboutsummaryrefslogtreecommitdiff
path: root/loslib.c
diff options
context:
space:
mode:
Diffstat (limited to 'loslib.c')
-rw-r--r--loslib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/loslib.c b/loslib.c
index ff313def..7dce9b26 100644
--- a/loslib.c
+++ b/loslib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loslib.c,v 1.2 2004/08/05 19:30:37 roberto Exp roberto $ 2** $Id: loslib.c,v 1.3 2004/10/08 18:57:16 roberto Exp roberto $
3** Standard Operating System library 3** Standard Operating System library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -91,15 +91,13 @@ static int io_clock (lua_State *L) {
91*/ 91*/
92 92
93static void setfield (lua_State *L, const char *key, int value) { 93static void setfield (lua_State *L, const char *key, int value) {
94 lua_pushstring(L, key);
95 lua_pushinteger(L, value); 94 lua_pushinteger(L, value);
96 lua_rawset(L, -3); 95 lua_setfield(L, -2, key);
97} 96}
98 97
99static void setboolfield (lua_State *L, const char *key, int value) { 98static void setboolfield (lua_State *L, const char *key, int value) {
100 lua_pushstring(L, key);
101 lua_pushboolean(L, value); 99 lua_pushboolean(L, value);
102 lua_rawset(L, -3); 100 lua_setfield(L, -2, key);
103} 101}
104 102
105static int getboolfield (lua_State *L, const char *key) { 103static int getboolfield (lua_State *L, const char *key) {