new field 'nilvalue' in struct 'global_State' to avoid the use of

addresses of static variables
This commit is contained in:
Roberto Ierusalimschy
2018-06-15 16:31:22 -03:00
parent d406d3d05f
commit b95e466218
5 changed files with 17 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lstate.h,v 2.157 2018/02/25 12:43:52 roberto Exp roberto $
** $Id: lstate.h,v 2.158 2018/03/16 15:33:34 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -148,6 +148,7 @@ typedef struct global_State {
lu_mem GCestimate; /* an estimate of the non-garbage memory in use */
stringtable strt; /* hash table for strings */
TValue l_registry;
TValue nilvalue; /* a nil value */
unsigned int seed; /* randomized seed for hashes */
lu_byte currentwhite;
lu_byte gcstate; /* state of garbage collector */