MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaD_protectedparser

Function luaD_protectedparser

freebsd/contrib/openzfs/module/lua/ldo.c:732–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730
731
732int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
733 const char *mode) {
734 struct SParser p;
735 int status;
736 L->nny++; /* cannot yield during parsing */
737 p.z = z; p.name = name; p.mode = mode;
738 p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;
739 p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;
740 p.dyd.label.arr = NULL; p.dyd.label.size = 0;
741 luaZ_initbuffer(L, &p.buff);
742 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc);
743 luaZ_freebuffer(L, &p.buff);
744 luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size);
745 luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size);
746 luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size);
747 L->nny--;
748 return status;
749}
750/* END CSTYLED */

Callers 1

lua_loadFunction · 0.70

Calls 1

luaD_pcallFunction · 0.70

Tested by

no test coverage detected