aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h16
1 files changed, 2 insertions, 14 deletions
diff --git a/lobject.h b/lobject.h
index b1407b77..4a0835a8 100644
--- a/lobject.h
+++ b/lobject.h
@@ -763,24 +763,12 @@ typedef union Node {
763 checkliveness(L,io_); } 763 checkliveness(L,io_); }
764 764
765 765
766/*
767** About 'alimit': if 'isrealasize(t)' is true, then 'alimit' is the
768** real size of 'array'. Otherwise, the real size of 'array' is the
769** smallest power of two not smaller than 'alimit' (or zero iff 'alimit'
770** is zero); 'alimit' is then used as a hint for #t.
771*/
772
773#define BITRAS (1 << 7)
774#define isrealasize(t) (!((t)->flags & BITRAS))
775#define setrealasize(t) ((t)->flags &= cast_byte(~BITRAS))
776#define setnorealasize(t) ((t)->flags |= BITRAS)
777
778 766
779typedef struct Table { 767typedef struct Table {
780 CommonHeader; 768 CommonHeader;
781 lu_byte flags; /* 1<<p means tagmethod(p) is not present */ 769 lu_byte flags; /* 1<<p means tagmethod(p) is not present */
782 lu_byte lsizenode; /* log2 of size of 'node' array */ 770 lu_byte lsizenode; /* log2 of number of slots of 'node' array */
783 unsigned int alimit; /* "limit" of 'array' array */ 771 unsigned int asize; /* number of slots in 'array' array */
784 Value *array; /* array part */ 772 Value *array; /* array part */
785 Node *node; 773 Node *node;
786 struct Table *metatable; 774 struct Table *metatable;