aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-12-05 15:50:10 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-12-05 15:50:10 -0200
commit04f95ce879ed3d942099145f5e408181a11f4411 (patch)
tree8077c1d6bf380f9c1c7fc3a8080735261d21ac81
parent27c6b4d42212eb0da07d9326470220818bb7b75f (diff)
downloadlua-04f95ce879ed3d942099145f5e408181a11f4411.tar.gz
lua-04f95ce879ed3d942099145f5e408181a11f4411.tar.bz2
lua-04f95ce879ed3d942099145f5e408181a11f4411.zip
hook counts are integers now
-rw-r--r--ldblib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldblib.c b/ldblib.c
index 130f9f5f..94087679 100644
--- a/ldblib.c
+++ b/ldblib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldblib.c,v 1.73 2002/11/25 17:47:13 roberto Exp roberto $ 2** $Id: ldblib.c,v 1.74 2002/12/04 17:38:31 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*/
@@ -155,7 +155,7 @@ static int sethook (lua_State *L) {
155 } 155 }
156 else { 156 else {
157 const char *smask = luaL_checkstring(L, 2); 157 const char *smask = luaL_checkstring(L, 2);
158 lua_Number count = luaL_optnumber(L, 3, 0); 158 int count = luaL_optint(L, 3, 0);
159 luaL_checktype(L, 1, LUA_TFUNCTION); 159 luaL_checktype(L, 1, LUA_TFUNCTION);
160 lua_sethook(L, hookf, makemask(smask, count), count); 160 lua_sethook(L, hookf, makemask(smask, count), count);
161 } 161 }