MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / combine

Function combine

third-party/lua-5.5.0/src/luac.c:144–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142#define toproto(L,i) getproto(s2v(L->top.p+(i)))
143
144static const Proto* combine(lua_State* L, int n)
145{
146 if (n==1)
147 return toproto(L,-1);
148 else
149 {
150 Proto* f;
151 int i=n;
152 if (lua_load(L,reader,&i,"=(" PROGNAME ")",NULL)!=LUA_OK) fatal(lua_tostring(L,-1));
153 f=toproto(L,-1);
154 for (i=0; i<n; i++)
155 {
156 f->p[i]=toproto(L,i-n-1);
157 if (f->p[i]->sizeupvalues>0) f->p[i]->upvalues[0].instack=0;
158 }
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.70

Calls 2

lua_loadFunction · 0.70
fatalFunction · 0.70

Tested by

no test coverage detected