MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / LoadProtos

Function LoadProtos

src/Chain/libraries/glua/lundump.cpp:171–189  ·  view source on GitHub ↗

500M

Source from the content-addressed store, hash-verified

169
170// 500M
171static bool LoadProtos(LoadState *S, Proto *f) {
172 int i;
173 int n = LoadInt(S);
174 if (n > g_sizelimit)
175 {
176 return false;
177 }
178
179 f->p = luaM_newvector(S->L, n, Proto *);
180 f->sizep = n;
181 for (i = 0; i < n; i++)
182 f->p[i] = nullptr;
183 for (i = 0; i < n; i++) {
184 f->p[i] = luaF_newproto(S->L);
185 LoadFunction(S, f->p[i], f->source);
186 }
187
188 return true;
189}
190
191// 500M
192static bool LoadUpvalues(LoadState *S, Proto *f) {

Callers 1

LoadFunctionFunction · 0.85

Calls 3

LoadIntFunction · 0.85
luaF_newprotoFunction · 0.85
LoadFunctionFunction · 0.85

Tested by

no test coverage detected