diff options
author | Mike Pall <mike> | 2012-09-20 15:50:20 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2012-09-20 15:50:20 +0200 |
commit | a9baead59f0521b289ba39e4d56ca92b0359e31e (patch) | |
tree | a50d922e3510da73b93b47100a31ab2bfdbba656 /src/lj_debug.h | |
parent | 965694b0afdebfa8b4b9b28a6a7f9341ea2f14f0 (diff) | |
download | luajit-a9baead59f0521b289ba39e4d56ca92b0359e31e.tar.gz luajit-a9baead59f0521b289ba39e4d56ca92b0359e31e.tar.bz2 luajit-a9baead59f0521b289ba39e4d56ca92b0359e31e.zip |
From Lua 5.2: debug.getinfo(..., "u") returns nparams and isvararg.
Diffstat (limited to '')
-rw-r--r-- | src/lj_debug.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lj_debug.h b/src/lj_debug.h index e00769ae..48e6a229 100644 --- a/src/lj_debug.h +++ b/src/lj_debug.h | |||
@@ -8,6 +8,24 @@ | |||
8 | 8 | ||
9 | #include "lj_obj.h" | 9 | #include "lj_obj.h" |
10 | 10 | ||
11 | typedef struct lj_Debug { | ||
12 | /* Common fields. Must be in the same order as in lua.h. */ | ||
13 | int event; | ||
14 | const char *name; | ||
15 | const char *namewhat; | ||
16 | const char *what; | ||
17 | const char *source; | ||
18 | int currentline; | ||
19 | int nups; | ||
20 | int linedefined; | ||
21 | int lastlinedefined; | ||
22 | char short_src[LUA_IDSIZE]; | ||
23 | int i_ci; | ||
24 | /* Extended fields. Only valid if lj_debug_getinfo() is called with ext = 1.*/ | ||
25 | int nparams; | ||
26 | int isvararg; | ||
27 | } lj_Debug; | ||
28 | |||
11 | LJ_FUNC cTValue *lj_debug_frame(lua_State *L, int level, int *size); | 29 | LJ_FUNC cTValue *lj_debug_frame(lua_State *L, int level, int *size); |
12 | LJ_FUNC BCLine LJ_FASTCALL lj_debug_line(GCproto *pt, BCPos pc); | 30 | LJ_FUNC BCLine LJ_FASTCALL lj_debug_line(GCproto *pt, BCPos pc); |
13 | LJ_FUNC const char *lj_debug_uvname(GCproto *pt, uint32_t idx); | 31 | LJ_FUNC const char *lj_debug_uvname(GCproto *pt, uint32_t idx); |
@@ -20,6 +38,8 @@ LJ_FUNC void lj_debug_shortname(char *out, GCstr *str); | |||
20 | LJ_FUNC void lj_debug_addloc(lua_State *L, const char *msg, | 38 | LJ_FUNC void lj_debug_addloc(lua_State *L, const char *msg, |
21 | cTValue *frame, cTValue *nextframe); | 39 | cTValue *frame, cTValue *nextframe); |
22 | LJ_FUNC void lj_debug_pushloc(lua_State *L, GCproto *pt, BCPos pc); | 40 | LJ_FUNC void lj_debug_pushloc(lua_State *L, GCproto *pt, BCPos pc); |
41 | LJ_FUNC int lj_debug_getinfo(lua_State *L, const char *what, lj_Debug *ar, | ||
42 | int ext); | ||
23 | 43 | ||
24 | /* Fixed internal variable names. */ | 44 | /* Fixed internal variable names. */ |
25 | #define VARNAMEDEF(_) \ | 45 | #define VARNAMEDEF(_) \ |