summaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-01-25 19:55:41 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-01-25 19:55:41 -0200
commita048cc9676f3572ebf5d6cc061f87cba85f5a249 (patch)
treea7a1fe7ebf6b0f1dab20eaf58176e46647e0ebc6 /lbaselib.c
parenteb262bc61754670d45fb030432932c599cdef2d6 (diff)
downloadlua-a048cc9676f3572ebf5d6cc061f87cba85f5a249.tar.gz
lua-a048cc9676f3572ebf5d6cc061f87cba85f5a249.tar.bz2
lua-a048cc9676f3572ebf5d6cc061f87cba85f5a249.zip
nil is a `valid' eventtable
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lbaselib.c b/lbaselib.c
index b06cc2b3..87e417aa 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -140,8 +140,9 @@ static int luaB_eventtable (lua_State *L) {
140 if (lua_isnone(L, 2)) 140 if (lua_isnone(L, 2))
141 lua_geteventtable(L, 1); 141 lua_geteventtable(L, 1);
142 else { 142 else {
143 int t = lua_type(L, 2);
144 luaL_arg_check(L, t == LUA_TNIL || t == LUA_TTABLE, 2, "nil/table expected");
143 lua_settop(L, 2); 145 lua_settop(L, 2);
144 luaL_check_type(L, 2, LUA_TTABLE);
145 lua_seteventtable(L, 1); 146 lua_seteventtable(L, 1);
146 } 147 }
147 return 1; 148 return 1;