summaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-03-27 12:30:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-03-27 12:30:41 -0300
commitd1f220217beadc102a8d44b8e930a92a9f54b001 (patch)
tree01e599fc7808818ad008599f192b57d32e97c995 /lbaselib.c
parent405e3a4597d6f935a7ac224ce67dce660e69c7be (diff)
downloadlua-d1f220217beadc102a8d44b8e930a92a9f54b001.tar.gz
lua-d1f220217beadc102a8d44b8e930a92a9f54b001.tar.bz2
lua-d1f220217beadc102a8d44b8e930a92a9f54b001.zip
when possible, library functions accept nil as none
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 2c63b3bb..9873d88d 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.60 2002/03/20 12:54:08 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.61 2002/03/27 12:49:53 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*/
@@ -620,7 +620,7 @@ static void set2 (lua_State *L, int i, int j) {
620 620
621static int sort_comp (lua_State *L, int a, int b) { 621static int sort_comp (lua_State *L, int a, int b) {
622 /* WARNING: the caller (auxsort) must ensure stack space */ 622 /* WARNING: the caller (auxsort) must ensure stack space */
623 if (!lua_isnil(L, 2)) { /* function? */ 623 if (!lua_isnoneornil(L, 2)) { /* function? */
624 int res; 624 int res;
625 lua_pushvalue(L, 2); 625 lua_pushvalue(L, 2);
626 lua_pushvalue(L, a-1); /* -1 to compensate function */ 626 lua_pushvalue(L, a-1); /* -1 to compensate function */