summaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-11-03 10:12:30 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-11-03 10:12:30 -0200
commit54eb35a8aa0f60265cf1b4764beabe1199d66f42 (patch)
tree83bc4049d312bdbe0b8e78ed1745839fcf9a5a03 /lobject.h
parentba36180fd7b68341ad57e0fbe7a55cdfb334908d (diff)
downloadlua-github-54eb35a8aa0f60265cf1b4764beabe1199d66f42.tar.gz
more fields moved out of 'CallInfo'
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/lobject.h b/lobject.h
index e3ae0050..66c41e6f 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
/*
-** $Id: lobject.h,v 2.125 2017/06/29 15:06:44 roberto Exp roberto $
+** $Id: lobject.h,v 2.126 2017/10/31 17:54:35 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -313,10 +313,21 @@ typedef union StackValue {
TValue val;
struct {
TValuefields;
+ lu_byte callstatus_;
unsigned short previous; /* difference to previous 'func' */
+ short nresults; /* expected number of results from this function */
+ unsigned short framesize; /* stack space available for this function */
} stkci;
} StackValue;
+#define callstatus(ar) ((ar)->stkci.callstatus_)
+
+/* top of a function (first element after its frame) */
+#define functop(func) ((func) + (func)->stkci.framesize)
+
+/* set top of a function to a specific value */
+#define setfunctop(func,v) ((func)->stkci.framesize = (v) - (func))
+
typedef StackValue *StkId; /* index to stack elements */