MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / luaD_protectedparser

Function luaD_protectedparser

Plugins/slua_unreal/External/lua/ldo.cpp:781–798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779
780
781int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
782 const char *mode) {
783 struct SParser p;
784 int status;
785 L->nny++; /* cannot yield during parsing */
786 p.z = z; p.name = name; p.mode = mode;
787 p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;
788 p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;
789 p.dyd.label.arr = NULL; p.dyd.label.size = 0;
790 luaZ_initbuffer(L, &p.buff);
791 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc);
792 luaZ_freebuffer(L, &p.buff);
793 luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size);
794 luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size);
795 luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size);
796 L->nny--;
797 return status;
798}
799
800} // end NS_SLUA

Callers 1

lua_loadFunction · 0.85

Calls 1

luaD_pcallFunction · 0.85

Tested by

no test coverage detected