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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lua51/ldo.c b/src/lua51/ldo.c
index eac8d03..d9b1ea8 100644
--- a/src/lua51/ldo.c
+++ b/src/lua51/ldo.c
@@ -468,7 +468,7 @@ LUA_API int lua_yield (lua_State *L, int nresults) {
}
-//c 调用函数
+//c 调用C函数
int luaD_pcall (lua_State *L, Pfunc func, void *u,
ptrdiff_t old_top, ptrdiff_t ef) {
int status;
@@ -513,6 +513,8 @@ static void f_parser (lua_State *L, void *ud) {
struct SParser *p = cast(struct SParser *, ud);
int c = luaZ_lookahead(p->z);
luaC_checkGC(L);
+ //c 如果是字节码,走直接加载字节码的流程
+ //c 如果是source,走编译流程
tf = ((c == LUA_SIGNATURE[0]) ? luaU_undump : luaY_parser)(L, p->z,
&p->buff, p->name);
cl = luaF_newLclosure(L, tf->nups, hvalue(gt(L)));