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

Function combine

third-party/lua-5.2.4/src/luac.c:136–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

pmainFunction · 0.70

Calls 2

lua_loadFunction · 0.70
fatalFunction · 0.70

Tested by

no test coverage detected