aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-08-30 10:44:28 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2023-08-30 10:44:28 -0300
commit96f77142374da8a4a7d4e5e8afd559fbaf0430e8 (patch)
tree5514ffbf943c95bd5eed14b096a370fefe6586e6 /lobject.h
parent05545816057cfdc54bb58199388a2d8878ae5542 (diff)
downloadlua-96f77142374da8a4a7d4e5e8afd559fbaf0430e8.tar.gz
lua-96f77142374da8a4a7d4e5e8afd559fbaf0430e8.tar.bz2
lua-96f77142374da8a4a7d4e5e8afd559fbaf0430e8.zip
Field 'Proto.is_vararg' uses only one bit
So that the other bits can be used for other purposes.
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lobject.h b/lobject.h
index 79dc6b1c..0e4924f5 100644
--- a/lobject.h
+++ b/lobject.h
@@ -544,13 +544,20 @@ typedef struct AbsLineInfo {
544 int line; 544 int line;
545} AbsLineInfo; 545} AbsLineInfo;
546 546
547
548/*
549** Flags in Prototypes
550*/
551#define PF_ISVARARG 1
552
553
547/* 554/*
548** Function Prototypes 555** Function Prototypes
549*/ 556*/
550typedef struct Proto { 557typedef struct Proto {
551 CommonHeader; 558 CommonHeader;
552 lu_byte numparams; /* number of fixed (named) parameters */ 559 lu_byte numparams; /* number of fixed (named) parameters */
553 lu_byte is_vararg; 560 lu_byte flag;
554 lu_byte maxstacksize; /* number of registers needed by this function */ 561 lu_byte maxstacksize; /* number of registers needed by this function */
555 int sizeupvalues; /* size of 'upvalues' */ 562 int sizeupvalues; /* size of 'upvalues' */
556 int sizek; /* size of 'k' */ 563 int sizek; /* size of 'k' */