diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-06-15 16:31:22 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-06-15 16:31:22 -0300 |
| commit | b95e46621873cfb460e1d11dcd153914d5d69f86 (patch) | |
| tree | aeb1db66a8254b5f997bcfd0a8ac606eea2f621c /lstate.c | |
| parent | d406d3d05ffe8bc01d6416437963ce092cfc9772 (diff) | |
| download | lua-b95e46621873cfb460e1d11dcd153914d5d69f86.tar.gz lua-b95e46621873cfb460e1d11dcd153914d5d69f86.tar.bz2 lua-b95e46621873cfb460e1d11dcd153914d5d69f86.zip | |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.c,v 2.152 2018/05/29 18:02:51 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.153 2018/06/01 17:40:38 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -345,6 +345,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | |||
| 345 | g->twups = NULL; | 345 | g->twups = NULL; |
| 346 | g->totalbytes = sizeof(LG); | 346 | g->totalbytes = sizeof(LG); |
| 347 | g->GCdebt = 0; | 347 | g->GCdebt = 0; |
| 348 | setnilvalue(&g->nilvalue); | ||
| 348 | setgcparam(g->gcpause, LUAI_GCPAUSE); | 349 | setgcparam(g->gcpause, LUAI_GCPAUSE); |
| 349 | setgcparam(g->gcstepmul, LUAI_GCMUL); | 350 | setgcparam(g->gcstepmul, LUAI_GCMUL); |
| 350 | g->gcstepsize = LUAI_GCSTEPSIZE; | 351 | g->gcstepsize = LUAI_GCSTEPSIZE; |
