diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-06-17 11:06:52 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-06-17 11:06:52 -0300 |
| commit | dba17070ac2a6a54079b0b935635377545a3b764 (patch) | |
| tree | 57d454c3f58bb5a41dcd99c058113e443b3ed897 /lstate.c | |
| parent | 569eefbf73a6c41b16aa6dc2d4f1c52ebde54084 (diff) | |
| download | lua-dba17070ac2a6a54079b0b935635377545a3b764.tar.gz lua-dba17070ac2a6a54079b0b935635377545a3b764.tar.bz2 lua-dba17070ac2a6a54079b0b935635377545a3b764.zip | |
optional error for accesss to undefined variables/fields
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.7 2004/05/31 18:51:50 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.8 2004/06/02 19:09:36 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 | */ |
| @@ -87,6 +87,7 @@ static void f_luaopen (lua_State *L, void *ud) { | |||
| 87 | setbit(L->marked, FIXEDBIT); | 87 | setbit(L->marked, FIXEDBIT); |
| 88 | stack_init(L, L); /* init stack */ | 88 | stack_init(L, L); /* init stack */ |
| 89 | sethvalue(L, gt(L), luaH_new(L, 0, 4)); /* table of globals */ | 89 | sethvalue(L, gt(L), luaH_new(L, 0, 4)); /* table of globals */ |
| 90 | hvalue(gt(L))->metatable = luaH_new(L, 0, 0); /* globals metatable */ | ||
| 90 | sethvalue(L, registry(L), luaH_new(L, 4, 4)); /* registry */ | 91 | sethvalue(L, registry(L), luaH_new(L, 4, 4)); /* registry */ |
| 91 | luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */ | 92 | luaS_resize(L, MINSTRTABSIZE); /* initial size of string table */ |
| 92 | luaT_init(L); | 93 | luaT_init(L); |
