diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-25 15:47:13 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-11-25 15:47:13 -0200 |
| commit | 5f698f8b6f7e5fb18e0a7386dc506b0d5b538e6b (patch) | |
| tree | 30ae565e9ca884a66c3cca023d24950972e02b0b /lua.h | |
| parent | 9b1c586b2f5b86173bf0ceca8a0dd84510af9024 (diff) | |
| download | lua-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.h | 12 |
1 files changed, 5 insertions, 7 deletions
| @@ -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 | ||
| 338 | typedef struct lua_Debug lua_Debug; /* activation record */ | 335 | typedef 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); | |||
| 345 | LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); | 342 | LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); |
| 346 | LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); | 343 | LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); |
| 347 | 344 | ||
| 348 | LUA_API int lua_sethook (lua_State *L, lua_Hook func, unsigned long mask); | 345 | LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count); |
| 349 | LUA_API lua_Hook lua_gethook (lua_State *L); | 346 | LUA_API lua_Hook lua_gethook (lua_State *L); |
| 350 | LUA_API unsigned long lua_gethookmask (lua_State *L); | 347 | LUA_API int lua_gethookmask (lua_State *L); |
| 348 | LUA_API int lua_gethookcount (lua_State *L); | ||
| 351 | 349 | ||
| 352 | 350 | ||
| 353 | #define LUA_IDSIZE 60 | 351 | #define LUA_IDSIZE 60 |
