summaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-06-15 16:31:22 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-06-15 16:31:22 -0300
commitb95e46621873cfb460e1d11dcd153914d5d69f86 (patch)
treeaeb1db66a8254b5f997bcfd0a8ac606eea2f621c /lstate.c
parentd406d3d05ffe8bc01d6416437963ce092cfc9772 (diff)
downloadlua-github-b95e46621873cfb460e1d11dcd153914d5d69f86.tar.gz
new field 'nilvalue' in struct 'global_State' to avoid the use of
addresses of static variables
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lstate.c b/lstate.c
index 2622a1d9..e369683e 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
/*
-** $Id: lstate.c,v 2.152 2018/05/29 18:02:51 roberto Exp roberto $
+** $Id: lstate.c,v 2.153 2018/06/01 17:40:38 roberto Exp roberto $
** Global State
** See Copyright Notice in lua.h
*/
@@ -345,6 +345,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
g->twups = NULL;
g->totalbytes = sizeof(LG);
g->GCdebt = 0;
+ setnilvalue(&g->nilvalue);
setgcparam(g->gcpause, LUAI_GCPAUSE);
setgcparam(g->gcstepmul, LUAI_GCMUL);
g->gcstepsize = LUAI_GCSTEPSIZE;