MCPcopy Create free account
hub / github.com/DFHack/dfhack / combine

Function combine

depends/lua/src/luac.c:139–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

pmainFunction · 0.85
runMethod · 0.85

Calls 2

lua_loadFunction · 0.85
fatalFunction · 0.85

Tested by

no test coverage detected