diff options
Diffstat (limited to 'ldblib.c')
| -rw-r--r-- | ldblib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldblib.c,v 1.43 2002/02/07 17:24:32 roberto Exp roberto $ | 2 | ** $Id: ldblib.c,v 1.44 2002/03/20 12:54:08 roberto Exp roberto $ |
| 3 | ** Interface from Lua to its debug API | 3 | ** Interface from Lua to its debug API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -141,7 +141,7 @@ static void linef (lua_State *L, lua_Debug *ar) { | |||
| 141 | static void sethook (lua_State *L, const char *key, lua_Hook hook, | 141 | static void sethook (lua_State *L, const char *key, lua_Hook hook, |
| 142 | lua_Hook (*sethookf)(lua_State * L, lua_Hook h)) { | 142 | lua_Hook (*sethookf)(lua_State * L, lua_Hook h)) { |
| 143 | lua_settop(L, 1); | 143 | lua_settop(L, 1); |
| 144 | if (lua_isnil(L, 1)) | 144 | if (lua_isnoneornil(L, 1)) |
| 145 | (*sethookf)(L, NULL); | 145 | (*sethookf)(L, NULL); |
| 146 | else if (lua_isfunction(L, 1)) | 146 | else if (lua_isfunction(L, 1)) |
| 147 | (*sethookf)(L, hook); | 147 | (*sethookf)(L, hook); |
