summaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-17 17:29:29 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-17 17:29:29 -0200
commit422318f6777d8d3bac13ade797d9c8eaa38686b6 (patch)
tree5cfabc21fcebb714daf237bff783fe9630e70582 /lstate.h
parent49dae52d0808776f5861eb33efa1d13b05e44512 (diff)
downloadlua-422318f6777d8d3bac13ade797d9c8eaa38686b6.tar.gz
lua-422318f6777d8d3bac13ade797d9c8eaa38686b6.tar.bz2
lua-422318f6777d8d3bac13ade797d9c8eaa38686b6.zip
two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structure
(for information about values being given and returned in function calls)
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lstate.h b/lstate.h
index 65229491..06581b01 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.154 2018/02/09 15:16:06 roberto Exp roberto $ 2** $Id: lstate.h,v 2.155 2018/02/15 18:06:24 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -103,9 +103,13 @@ typedef struct CallInfo {
103 union { 103 union {
104 int funcidx; /* called-function index */ 104 int funcidx; /* called-function index */
105 int nyield; /* number of values yielded */ 105 int nyield; /* number of values yielded */
106 struct { /* info about transfered values (for call/return hooks) */
107 unsigned short fTransfer; /* offset of first value transfered */
108 unsigned short nTransfer; /* number of values transfered */
109 } transferinfo;
106 } u2; 110 } u2;
107 short nresults; /* expected number of results from this function */ 111 short nresults; /* expected number of results from this function */
108 lu_byte callstatus; 112 unsigned short callstatus;
109} CallInfo; 113} CallInfo;
110 114
111 115
@@ -120,6 +124,7 @@ typedef struct CallInfo {
120#define CIST_HOOKYIELD (1<<5) /* last hook called yielded */ 124#define CIST_HOOKYIELD (1<<5) /* last hook called yielded */
121#define CIST_LEQ (1<<6) /* using __lt for __le */ 125#define CIST_LEQ (1<<6) /* using __lt for __le */
122#define CIST_FIN (1<<7) /* call is running a finalizer */ 126#define CIST_FIN (1<<7) /* call is running a finalizer */
127#define CIST_TRAN (1<<8) /* 'ci' has transfer information */
123 128
124/* active function is a Lua function */ 129/* active function is a Lua function */
125#define isLua(ci) (!((ci)->callstatus & CIST_C)) 130#define isLua(ci) (!((ci)->callstatus & CIST_C))