diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-12-23 16:19:57 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-12-23 16:19:57 -0200 |
commit | b1b0c219f5255a0cd0921ebc0a77a81f99b72532 (patch) | |
tree | 7cb4d9cbbdb1309b94794eb75694b02f2b08f75a /lparser.c | |
parent | be3212de781786c0a68365dee1d3510407b5c325 (diff) | |
download | lua-b1b0c219f5255a0cd0921ebc0a77a81f99b72532.tar.gz lua-b1b0c219f5255a0cd0921ebc0a77a81f99b72532.tar.bz2 lua-b1b0c219f5255a0cd0921ebc0a77a81f99b72532.zip |
new ttypes to distinguish between C closures and Lua closures.
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lparser.c,v 1.48 1999/12/21 17:31:28 roberto Exp roberto $ | 2 | ** $Id: lparser.c,v 1.49 1999/12/22 16:58:36 roberto Exp roberto $ |
3 | ** LL(1) Parser and code generator for Lua | 3 | ** LL(1) Parser and code generator for Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -547,7 +547,7 @@ static void func_onstack (LexState *ls, FuncState *func) { | |||
547 | FuncState *fs = ls->fs; | 547 | FuncState *fs = ls->fs; |
548 | int i; | 548 | int i; |
549 | int c = next_constant(ls, fs->f); | 549 | int c = next_constant(ls, fs->f); |
550 | ttype(&fs->f->consts[c]) = LUA_T_PROTO; | 550 | ttype(&fs->f->consts[c]) = LUA_T_LPROTO; |
551 | fs->f->consts[c].value.tf = func->f; | 551 | fs->f->consts[c].value.tf = func->f; |
552 | if (func->nupvalues == 0) | 552 | if (func->nupvalues == 0) |
553 | code_constant(ls, c); | 553 | code_constant(ls, c); |
@@ -580,7 +580,7 @@ static void init_state (LexState *ls, FuncState *fs, TaggedString *source) { | |||
580 | code_byte(ls, 0); /* to be filled with arg information */ | 580 | code_byte(ls, 0); /* to be filled with arg information */ |
581 | /* push function (to avoid GC) */ | 581 | /* push function (to avoid GC) */ |
582 | tfvalue(L->top) = f; | 582 | tfvalue(L->top) = f; |
583 | ttype(L->top) = LUA_T_PROTO; | 583 | ttype(L->top) = LUA_T_LPROTO; |
584 | incr_top; | 584 | incr_top; |
585 | } | 585 | } |
586 | 586 | ||