diff options
Diffstat (limited to 'src/lj_func.c')
-rw-r--r-- | src/lj_func.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lj_func.c b/src/lj_func.c index 7d130176..3766b25e 100644 --- a/src/lj_func.c +++ b/src/lj_func.c | |||
@@ -101,8 +101,8 @@ GCfunc *lj_func_newC(lua_State *L, MSize nelems, GCtab *env) | |||
101 | fn->c.ffid = FF_C; | 101 | fn->c.ffid = FF_C; |
102 | fn->c.nupvalues = cast_byte(nelems); | 102 | fn->c.nupvalues = cast_byte(nelems); |
103 | /* NOBARRIER: The GCfunc is new (marked white). */ | 103 | /* NOBARRIER: The GCfunc is new (marked white). */ |
104 | setmref(fn->c.pc, &G(L)->bc_cfunc_ext); | ||
104 | setgcref(fn->c.env, obj2gco(env)); | 105 | setgcref(fn->c.env, obj2gco(env)); |
105 | fn->c.gate = G(L)->wrapmode ? lj_gate_cwrap : lj_gate_c; | ||
106 | return fn; | 106 | return fn; |
107 | } | 107 | } |
108 | 108 | ||
@@ -115,7 +115,6 @@ GCfunc *lj_func_newL(lua_State *L, GCproto *pt, GCtab *env) | |||
115 | /* NOBARRIER: Really a setgcref. But the GCfunc is new (marked white). */ | 115 | /* NOBARRIER: Really a setgcref. But the GCfunc is new (marked white). */ |
116 | setmref(fn->l.pc, proto_bc(pt)); | 116 | setmref(fn->l.pc, proto_bc(pt)); |
117 | setgcref(fn->l.env, obj2gco(env)); | 117 | setgcref(fn->l.env, obj2gco(env)); |
118 | fn->l.gate = (pt->flags & PROTO_IS_VARARG) ? lj_gate_lv : lj_gate_lf; | ||
119 | return fn; | 118 | return fn; |
120 | } | 119 | } |
121 | 120 | ||