aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-05 13:59:21 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-05 13:59:21 -0300
commit6dd0b6c62bd0016f456676c335308ebdfe6ce05d (patch)
treed3aff12bea204d33ade6e3481206ecffc8720f4c
parentfa233012511e42740cb3ed12d553ad8f0a8e49d2 (diff)
downloadlua-6dd0b6c62bd0016f456676c335308ebdfe6ce05d.tar.gz
lua-6dd0b6c62bd0016f456676c335308ebdfe6ce05d.tar.bz2
lua-6dd0b6c62bd0016f456676c335308ebdfe6ce05d.zip
details
-rw-r--r--lbaselib.c4
-rw-r--r--ltablib.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 88c8db67..847b91ef 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.75 2002/05/16 19:09:19 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.76 2002/06/03 20:11:41 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*/
@@ -106,7 +106,7 @@ static int luaB_metatable (lua_State *L) {
106 106
107static int luaB_globals (lua_State *L) { 107static int luaB_globals (lua_State *L) {
108 lua_getglobals(L); /* value to be returned */ 108 lua_getglobals(L); /* value to be returned */
109 if (!lua_isnone(L, 1)) { 109 if (!lua_isnoneornil(L, 1)) {
110 luaL_check_type(L, 1, LUA_TTABLE); 110 luaL_check_type(L, 1, LUA_TTABLE);
111 lua_pushvalue(L, 1); /* new table of globals */ 111 lua_pushvalue(L, 1); /* new table of globals */
112 lua_setglobals(L); 112 lua_setglobals(L);
diff --git a/ltablib.c b/ltablib.c
index a5e9148d..070569de 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.2 2002/04/12 19:57:29 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.3 2002/05/02 17:12:27 roberto Exp roberto $
3** Library for Table Manipulation 3** Library for Table Manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -204,7 +204,7 @@ static int luaB_sort (lua_State *L) {
204 int n; 204 int n;
205 luaL_check_type(L, 1, LUA_TTABLE); 205 luaL_check_type(L, 1, LUA_TTABLE);
206 n = lua_getn(L, 1); 206 n = lua_getn(L, 1);
207 if (!lua_isnone(L, 2)) /* is there a 2nd argument? */ 207 if (!lua_isnoneornil(L, 2)) /* is there a 2nd argument? */
208 luaL_check_type(L, 2, LUA_TFUNCTION); 208 luaL_check_type(L, 2, LUA_TFUNCTION);
209 lua_settop(L, 2); /* make sure there is two arguments */ 209 lua_settop(L, 2); /* make sure there is two arguments */
210 auxsort(L, 1, n); 210 auxsort(L, 1, n);