MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaD_protectedparser

Function luaD_protectedparser

3rd/lua-5.4.3/src/ldo.c:944–961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942
943
944int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
945 const char *mode) {
946 struct SParser p;
947 int status;
948 incnny(L); /* cannot yield during parsing */
949 p.z = z; p.name = name; p.mode = mode;
950 p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;
951 p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;
952 p.dyd.label.arr = NULL; p.dyd.label.size = 0;
953 luaZ_initbuffer(L, &p.buff);
954 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc);
955 luaZ_freebuffer(L, &p.buff);
956 luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size);
957 luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size);
958 luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size);
959 decnny(L);
960 return status;
961}
962
963

Callers 1

lua_loadFunction · 0.85

Calls 1

luaD_pcallFunction · 0.85

Tested by

no test coverage detected