summaryrefslogtreecommitdiff
path: root/src/loslib.c
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2005-03-04 12:00:00 +0000
committerrepogen <>2005-03-04 12:00:00 +0000
commite6ddfd3b09c0a3727afc773029c323a3defe50fa (patch)
tree70e021a2b008f43064eeb04e002a31ba371b5108 /src/loslib.c
parente2493a40ee611d5a718fd2a81fe67e24c04c91a0 (diff)
downloadlua-github-5.1-work5.tar.gz
Lua 5.1-work55.1-work5
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) {