summaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-12 14:23:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-12 14:23:12 -0300
commit8e4ac679ffce4a2d59b0a404473275411854f598 (patch)
tree8758db19adc160f2366d40f2d39287611a3d4279 /lua.h
parent221b5be7b78dc401d4fac49df534f7ff68c04d58 (diff)
downloadlua-8e4ac679ffce4a2d59b0a404473275411854f598.tar.gz
lua-8e4ac679ffce4a2d59b0a404473275411854f598.tar.bz2
lua-8e4ac679ffce4a2d59b0a404473275411854f598.zip
use a linear count for count hook
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/lua.h b/lua.h
index 2eef5439..aa7fd893 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.152 2002/08/06 18:01:50 roberto Exp roberto $ 2** $Id: lua.h,v 1.153 2002/08/06 18:54:18 roberto Exp roberto $
3** Lua - An Extensible Extension Language 3** Lua - An Extensible Extension Language
4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil 4** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
5** http://www.lua.org mailto:info@lua.org 5** http://www.lua.org mailto:info@lua.org
@@ -316,8 +316,10 @@ typedef enum lua_Hookevent {
316#define LUA_MASKCALL (2 << LUA_HOOKCALL) 316#define LUA_MASKCALL (2 << LUA_HOOKCALL)
317#define LUA_MASKRET (2 << LUA_HOOKRET) 317#define LUA_MASKRET (2 << LUA_HOOKRET)
318#define LUA_MASKLINE (2 << LUA_HOOKLINE) 318#define LUA_MASKLINE (2 << LUA_HOOKLINE)
319#define LUA_MASKCOUNT(count) ((count) << (LUA_HOOKCOUNT+1)) 319#define LUA_MASKCOUNT(count) ((unsigned long)(count) << 8)
320#define lua_getmaskcount(mask) ((mask) >> (LUA_HOOKCOUNT+1)) 320#define lua_getmaskcount(mask) ((mask) >> 8)
321
322#define LUA_MAXCOUNT ((1<<24) - 1)
321 323
322typedef struct lua_Debug lua_Debug; /* activation record */ 324typedef struct lua_Debug lua_Debug; /* activation record */
323 325
@@ -329,9 +331,9 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
329LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); 331LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);
330LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); 332LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);
331 333
332LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask); 334LUA_API int lua_sethook (lua_State *L, lua_Hook func, unsigned long mask);
333LUA_API lua_Hook lua_gethook (lua_State *L); 335LUA_API lua_Hook lua_gethook (lua_State *L);
334LUA_API int lua_gethookmask (lua_State *L); 336LUA_API unsigned long lua_gethookmask (lua_State *L);
335 337
336 338
337#define LUA_IDSIZE 60 339#define LUA_IDSIZE 60