diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-26 17:36:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-26 17:36:17 -0300 |
commit | 5fabed21a17b133182a7e47712b7c7602ea87401 (patch) | |
tree | d78a55ae77d64cf8a7557aa7f3124109560b85f9 | |
parent | f67ccfbdeb9595b0549a733d229a02a7c3205ddc (diff) | |
download | lua-5fabed21a17b133182a7e47712b7c7602ea87401.tar.gz lua-5fabed21a17b133182a7e47712b7c7602ea87401.tar.bz2 lua-5fabed21a17b133182a7e47712b7c7602ea87401.zip |
getglobals(0) is the C global table
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | ||
112 | static int luaB_getglobals (lua_State *L) { | 112 | static 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 | } |