summaryrefslogtreecommitdiff
path: root/src/lua51/ldo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua51/ldo.c')
-rw-r--r--src/lua51/ldo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lua51/ldo.c b/src/lua51/ldo.c
index 2311d41..736697d 100644
--- a/src/lua51/ldo.c
+++ b/src/lua51/ldo.c
@@ -533,7 +533,7 @@ static void f_parser (lua_State *L, void *ud) {
//c 编译之后会得到Proto* tf, 所有的信息,包括常量表、upvalue、字节码、local变量数量等等都在里面
- cl = luaF_newLclosure(L, tf->nups, hvalue(gt(L)));
+ cl = luaF_newLclosure(L, tf->nups, hvalue(gt(L))); // 初始情况下函数原型的环境表是全局表
cl->l.p = tf; //c 设置proto = tf
//c 新建nups个closed upvalue
for (i = 0; i < tf->nups; i++) /* initialize eventual upvalues */