From d1f220217beadc102a8d44b8e930a92a9f54b001 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 27 Mar 2002 12:30:41 -0300 Subject: when possible, library functions accept nil as none --- ldblib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldblib.c') diff --git a/ldblib.c b/ldblib.c index e379acfd..886dddb8 100644 --- a/ldblib.c +++ b/ldblib.c @@ -1,5 +1,5 @@ /* -** $Id: ldblib.c,v 1.43 2002/02/07 17:24:32 roberto Exp roberto $ +** $Id: ldblib.c,v 1.44 2002/03/20 12:54:08 roberto Exp roberto $ ** Interface from Lua to its debug API ** See Copyright Notice in lua.h */ @@ -141,7 +141,7 @@ static void linef (lua_State *L, lua_Debug *ar) { static void sethook (lua_State *L, const char *key, lua_Hook hook, lua_Hook (*sethookf)(lua_State * L, lua_Hook h)) { lua_settop(L, 1); - if (lua_isnil(L, 1)) + if (lua_isnoneornil(L, 1)) (*sethookf)(L, NULL); else if (lua_isfunction(L, 1)) (*sethookf)(L, hook); -- cgit v1.2.3-55-g6feb