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

Function luaD_protectedparser

extlibs/lua/src/ldo.c:803–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801
802
803int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
804 const char *mode) {
805 struct SParser p;
806 int status;
807 incnny(L); /* cannot yield during parsing */
808 p.z = z; p.name = name; p.mode = mode;
809 p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;
810 p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;
811 p.dyd.label.arr = NULL; p.dyd.label.size = 0;
812 luaZ_initbuffer(L, &p.buff);
813 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc);
814 luaZ_freebuffer(L, &p.buff);
815 luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size);
816 luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size);
817 luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size);
818 decnny(L);
819 return status;
820}
821
822

Callers 1

lua_loadFunction · 0.85

Calls 1

luaD_pcallFunction · 0.85

Tested by

no test coverage detected