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

Function combine

src/Chain/libraries/glua/luac.cpp:140–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138#define toproto(L,i) getproto(L->top+(i))
139
140static const Proto* combine(lua_State* L, int n)
141{
142 if (n == 1)
143 return toproto(L, -1);
144 else
145 {
146 Proto* f;
147 int i = n;
148 if (lua_load(L, reader, &i, "=(" PROGNAME ")", nullptr) != LUA_OK) fatal(lua_tostring(L, -1));
149 f = toproto(L, -1);
150 for (i = 0; i < n; i++)
151 {
152 f->p[i] = toproto(L, i - n - 1);
153 if (f->p[i]->sizeupvalues > 0) f->p[i]->upvalues[0].instack = 0;
154 }
155 f->sizelineinfo = 0;
156 return f;
157 }
158}
159
160static int writer(lua_State* L, const void* p, size_t size, void* u)
161{

Callers 1

pmainFunction · 0.70

Calls 3

toprotoFunction · 0.85
lua_loadFunction · 0.85
fatalFunction · 0.85

Tested by

no test coverage detected