diff options
Diffstat (limited to 'luadebug.h')
| -rw-r--r-- | luadebug.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/luadebug.h b/luadebug.h deleted file mode 100644 index 4a37c640..00000000 --- a/luadebug.h +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | /* | ||
| 2 | ** $Id: luadebug.h,v 1.30 2002/07/08 20:22:08 roberto Exp $ | ||
| 3 | ** Debugging API | ||
| 4 | ** See Copyright Notice in lua.h | ||
| 5 | */ | ||
| 6 | |||
| 7 | |||
| 8 | #ifndef luadebug_h | ||
| 9 | #define luadebug_h | ||
| 10 | |||
| 11 | |||
| 12 | #include "lua.h" | ||
| 13 | |||
| 14 | typedef enum lua_Hookevent { | ||
| 15 | LUA_HOOKCALL, LUA_HOOKRET, LUA_HOOKLINE, LUA_HOOKCOUNT | ||
| 16 | } lua_Hookevent; | ||
| 17 | |||
| 18 | |||
| 19 | #define LUA_MASKCALL (2 << LUA_HOOKCALL) | ||
| 20 | #define LUA_MASKRET (2 << LUA_HOOKRET) | ||
| 21 | #define LUA_MASKLINE (2 << LUA_HOOKLINE) | ||
| 22 | #define LUA_MASKCOUNT(count) ((count) << (LUA_HOOKCOUNT+1)) | ||
| 23 | #define lua_getmaskcount(mask) ((mask) >> (LUA_HOOKCOUNT+1)) | ||
| 24 | |||
| 25 | typedef struct lua_Debug lua_Debug; /* activation record */ | ||
| 26 | |||
| 27 | typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar); | ||
| 28 | |||
| 29 | |||
| 30 | LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar); | ||
| 31 | LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar); | ||
| 32 | LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n); | ||
| 33 | LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n); | ||
| 34 | |||
| 35 | LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask); | ||
| 36 | LUA_API lua_Hook lua_gethook (lua_State *L); | ||
| 37 | LUA_API int lua_gethookmask (lua_State *L); | ||
| 38 | |||
| 39 | |||
| 40 | #define LUA_IDSIZE 60 | ||
| 41 | |||
| 42 | struct lua_Debug { | ||
| 43 | lua_Hookevent event; | ||
| 44 | const char *name; /* (n) */ | ||
| 45 | const char *namewhat; /* (n) `global', `local', `field', `method' */ | ||
| 46 | const char *what; /* (S) `Lua' function, `C' function, Lua `main' */ | ||
| 47 | const char *source; /* (S) */ | ||
| 48 | int currentline; /* (l) */ | ||
| 49 | int nups; /* (u) number of upvalues */ | ||
| 50 | int linedefined; /* (S) */ | ||
| 51 | char short_src[LUA_IDSIZE]; /* (S) */ | ||
| 52 | /* private part */ | ||
| 53 | int i_ci; /* active function */ | ||
| 54 | }; | ||
| 55 | |||
| 56 | |||
| 57 | #endif | ||
