MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / luaD_protectedparser

Function luaD_protectedparser

xrepo/packages/l/lua/port/lua/src/ldo.c:978–995  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

976
977
978int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
979 const char *mode) {
980 struct SParser p;
981 int status;
982 incnny(L); /* cannot yield during parsing */
983 p.z = z; p.name = name; p.mode = mode;
984 p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;
985 p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;
986 p.dyd.label.arr = NULL; p.dyd.label.size = 0;
987 luaZ_initbuffer(L, &p.buff);
988 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc);
989 luaZ_freebuffer(L, &p.buff);
990 luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size);
991 luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size);
992 luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size);
993 decnny(L);
994 return status;
995}
996
997

Callers 1

lua_loadFunction · 0.85

Calls 2

luaM_freearrayFunction · 0.85
luaD_pcallFunction · 0.70

Tested by

no test coverage detected