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

Function combine

src/Chain/libraries/glua/lcompile.cpp:63–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63static const Proto* combine(lua_State* L, int n)
64{
65 if (n == 1)
66 return toproto(L, -1);
67 else
68 {
69 Proto* f;
70 int i = n;
71 if (lua_load(L, reader, &i, "=(" PROGNAME ")", nullptr) != LUA_OK)
72 {
73 // fatal(lua_tostring(L, -1));
74 l_fatal(L, lua_tostring(L, -1));
75 return nullptr;
76 }
77 f = toproto(L, -1);
78 for (i = 0; i < n; i++)
79 {
80 f->p[i] = toproto(L, i - n - 1);
81 if (f->p[i]->sizeupvalues > 0) f->p[i]->upvalues[0].instack = 0;
82 }
83 f->sizelineinfo = 0;
84 return f;
85 }
86}
87
88static int writer(lua_State* L, const void* p, size_t size, void* u)
89{

Callers

nothing calls this directly

Calls 3

toprotoFunction · 0.85
lua_loadFunction · 0.85
l_fatalFunction · 0.85

Tested by

no test coverage detected