MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaD_protectedparser

Function luaD_protectedparser

lib/lua/src/ldo.c:1009–1026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1007
1008
1009int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
1010 const char *mode) {
1011 struct SParser p;
1012 int status;
1013 incnny(L); /* cannot yield during parsing */
1014 p.z = z; p.name = name; p.mode = mode;
1015 p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;
1016 p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;
1017 p.dyd.label.arr = NULL; p.dyd.label.size = 0;
1018 luaZ_initbuffer(L, &p.buff);
1019 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top.p), L->errfunc);
1020 luaZ_freebuffer(L, &p.buff);
1021 luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size);
1022 luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size);
1023 luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size);
1024 decnny(L);
1025 return status;
1026}
1027
1028

Callers 1

lua_loadFunction · 0.85

Calls 1

luaD_pcallFunction · 0.85

Tested by

no test coverage detected