MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / main

Function main

3rd/lua-5.4.3/src/luac.c:197–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197int main(int argc, char* argv[])
198{
199 lua_State* L;
200 int i=doargs(argc,argv);
201 argc-=i; argv+=i;
202 if (argc<=0) usage("no input files given");
203 L=luaL_newstate();
204 if (L==NULL) fatal("cannot create state: not enough memory");
205 lua_pushcfunction(L,&pmain);
206 lua_pushinteger(L,argc);
207 lua_pushlightuserdata(L,argv);
208 if (lua_pcall(L,2,0,0)!=LUA_OK) fatal(lua_tostring(L,-1));
209 lua_close(L);
210 return EXIT_SUCCESS;
211}
212
213/*
214** print bytecodes

Callers

nothing calls this directly

Calls 7

doargsFunction · 0.85
luaL_newstateFunction · 0.85
fatalFunction · 0.85
lua_pushintegerFunction · 0.85
lua_pushlightuserdataFunction · 0.85
lua_closeFunction · 0.85
usageFunction · 0.70

Tested by

no test coverage detected