Tables have a 'lastfree' information only when needed
Only tables with some minimum number of entries in their hash part have a 'lastfree' field, kept in a header before the node vector.
This commit is contained in:
14
ltable.h
14
ltable.h
@@ -23,8 +23,18 @@
|
||||
#define invalidateTMcache(t) ((t)->flags &= ~maskflags)
|
||||
|
||||
|
||||
/* true when 't' is using 'dummynode' as its hash part */
|
||||
#define isdummy(t) ((t)->lastfree == NULL)
|
||||
/*
|
||||
** Bit BITDUMMY set in 'flags' means the table is using the dummy node
|
||||
** for its hash part.
|
||||
*/
|
||||
|
||||
#define BITDUMMY (1 << 6)
|
||||
#define NOTBITDUMMY cast_byte(~BITDUMMY)
|
||||
#define isdummy(t) ((t)->flags & BITDUMMY)
|
||||
|
||||
#define setnodummy(t) ((t)->flags &= NOTBITDUMMY)
|
||||
#define setdummy(t) ((t)->flags |= BITDUMMY)
|
||||
|
||||
|
||||
|
||||
/* allocated size for hash nodes */
|
||||
|
||||
Reference in New Issue
Block a user