MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / combine

Function combine

extlibs/lua/src/luac.c:143–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

pmainFunction · 0.85

Calls 2

fatalFunction · 0.85
lua_loadFunction · 0.70

Tested by

no test coverage detected