summaryrefslogtreecommitdiff
path: root/src/loslib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/loslib.c')
-rw-r--r--src/loslib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/loslib.c b/src/loslib.c
index 4f1d2d03..dad959e2 100644
--- a/src/loslib.c
+++ b/src/loslib.c
@@ -1,5 +1,5 @@
/*
-** $Id: loslib.c,v 1.3 2004/10/08 18:57:16 roberto Exp $
+** $Id: loslib.c,v 1.4 2005/01/10 19:16:29 roberto Exp $
** Standard Operating System library
** See Copyright Notice in lua.h
*/
@@ -91,15 +91,13 @@ static int io_clock (lua_State *L) {
*/
static void setfield (lua_State *L, const char *key, int value) {
- lua_pushstring(L, key);
lua_pushinteger(L, value);
- lua_rawset(L, -3);
+ lua_setfield(L, -2, key);
}
static void setboolfield (lua_State *L, const char *key, int value) {
- lua_pushstring(L, key);
lua_pushboolean(L, value);
- lua_rawset(L, -3);
+ lua_setfield(L, -2, key);
}
static int getboolfield (lua_State *L, const char *key) {