aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-26 17:36:17 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-26 17:36:17 -0300
commit5fabed21a17b133182a7e47712b7c7602ea87401 (patch)
treed78a55ae77d64cf8a7557aa7f3124109560b85f9
parentf67ccfbdeb9595b0549a733d229a02a7c3205ddc (diff)
downloadlua-5fabed21a17b133182a7e47712b7c7602ea87401.tar.gz
lua-5fabed21a17b133182a7e47712b7c7602ea87401.tar.bz2
lua-5fabed21a17b133182a7e47712b7c7602ea87401.zip
getglobals(0) is the C global table
-rw-r--r--lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 40567969..48544e2b 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.86 2002/06/26 16:37:13 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.87 2002/06/26 19:28:44 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -111,7 +111,7 @@ static int luaB_setmetatable (lua_State *L) {
111 111
112static int luaB_getglobals (lua_State *L) { 112static int luaB_getglobals (lua_State *L) {
113 int level = luaL_opt_int(L, 1, 1); 113 int level = luaL_opt_int(L, 1, 1);
114 luaL_arg_check(L, level >= 1, 2, "level must be positive"); 114 luaL_arg_check(L, level >= 0, 2, "level must be non-negative");
115 lua_getglobals(L, level); /* value to be returned */ 115 lua_getglobals(L, level); /* value to be returned */
116 return 1; 116 return 1;
117} 117}