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

Function getUpvalName

src/Chain/libraries/glua/glua_decompile.cpp:280–289  ·  view source on GitHub ↗

i : index of Proto.upvalues

Source from the content-addressed store, hash-verified

278
279// i : index of Proto.upvalues
280std::string getUpvalName(GluaDecompileContextP ctx, const Proto* f, int i) {
281 if (f->upvalues && i < f->sizeupvalues) {
282 // no need to test after FixUpvalNames
283 return getstr(UPVAL_NAME(f, i));
284 }
285 else {
286 ctx->unknown_upvalue = std::string("ERROR_unknown_upvalue_") + std::to_string(i);
287 return ctx->unknown_upvalue;
288 }
289}
290
291#define UPVALUE(ctx, i) (getUpvalName(ctx, F->f,i))
292#define LOCAL(ctx, i) (getLocalName(ctx, F->f,i))

Callers 1

listUpvaluesFunction · 0.85

Calls 2

stringClass · 0.50
to_stringFunction · 0.50

Tested by

no test coverage detected