aboutsummaryrefslogtreecommitdiff
path: root/lua.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-11-25 15:47:13 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-11-25 15:47:13 -0200
commit5f698f8b6f7e5fb18e0a7386dc506b0d5b538e6b (patch)
tree30ae565e9ca884a66c3cca023d24950972e02b0b /lua.h
parent9b1c586b2f5b86173bf0ceca8a0dd84510af9024 (diff)
downloadlua-5f698f8b6f7e5fb18e0a7386dc506b0d5b538e6b.tar.gz
lua-5f698f8b6f7e5fb18e0a7386dc506b0d5b538e6b.tar.bz2
lua-5f698f8b6f7e5fb18e0a7386dc506b0d5b538e6b.zip
simpler interface to hooks + use of `int' to count hooks
Diffstat (limited to 'lua.h')
-rw-r--r--lua.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/lua.h b/lua.h
index c3abafa7..4b600548 100644
--- a/lua.h
+++ b/lua.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lua.h,v 1.164 2002/11/14 11:51:50 roberto Exp roberto $ 2** $Id: lua.h,v 1.165 2002/11/18 11:01:55 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
@@ -330,10 +330,7 @@ LUA_API int lua_pushupvalues (lua_State *L);
330#define LUA_MASKCALL (1 << LUA_HOOKCALL) 330#define LUA_MASKCALL (1 << LUA_HOOKCALL)
331#define LUA_MASKRET (1 << LUA_HOOKRET) 331#define LUA_MASKRET (1 << LUA_HOOKRET)
332#define LUA_MASKLINE (1 << LUA_HOOKLINE) 332#define LUA_MASKLINE (1 << LUA_HOOKLINE)
333#define LUA_MASKCOUNT(count) ((unsigned long)(count) << 8) 333#define LUA_MASKCOUNT (1 << LUA_HOOKCOUNT)
334#define lua_getmaskcount(mask) ((mask) >> 8)
335
336#define LUA_MAXCOUNT ((~(unsigned long)0) >> 8)
337 334
338typedef struct lua_Debug lua_Debug; /* activation record */ 335typedef struct lua_Debug lua_Debug; /* activation record */
339 336
@@ -345,9 +342,10 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
345LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); 342LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);
346LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); 343LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);
347 344
348LUA_API int lua_sethook (lua_State *L, lua_Hook func, unsigned long mask); 345LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count);
349LUA_API lua_Hook lua_gethook (lua_State *L); 346LUA_API lua_Hook lua_gethook (lua_State *L);
350LUA_API unsigned long lua_gethookmask (lua_State *L); 347LUA_API int lua_gethookmask (lua_State *L);
348LUA_API int lua_gethookcount (lua_State *L);
351 349
352 350
353#define LUA_IDSIZE 60 351#define LUA_IDSIZE 60