mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
Details
This commit is contained in:
parent
ae23e72601
commit
0da6d320f7
3 changed files with 12 additions and 7 deletions
8
lcode.c
8
lcode.c
|
|
@ -663,11 +663,11 @@ static int boolT (FuncState *fs) {
|
|||
** Add nil to list of constants and return its index.
|
||||
*/
|
||||
static int nilK (FuncState *fs) {
|
||||
TValue k, v;
|
||||
setnilvalue(&v);
|
||||
lua_State *L = fs->ls->L;
|
||||
TValue k;
|
||||
/* cannot use nil as key; instead use table itself */
|
||||
sethvalue(fs->ls->L, &k, fs->kcache);
|
||||
return k2proto(fs, &k, &v);
|
||||
sethvalue(L, &k, fs->kcache);
|
||||
return k2proto(fs, &k, &G(L)->nilvalue);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue