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

Function main

third-party/lua-5.3.5/src/luac.c:192–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192int main(int argc, char* argv[])
193{
194 lua_State* L;
195 int i=doargs(argc,argv);
196 argc-=i; argv+=i;
197 if (argc<=0) usage("no input files given");
198 L=luaL_newstate();
199 if (L==NULL) fatal("cannot create state: not enough memory");
200 lua_pushcfunction(L,&pmain);
201 lua_pushinteger(L,argc);
202 lua_pushlightuserdata(L,argv);
203 if (lua_pcall(L,2,0,0)!=LUA_OK) fatal(lua_tostring(L,-1));
204 lua_close(L);
205 return EXIT_SUCCESS;
206}
207
208/*
209** $Id: luac.c,v 1.76 2018/06/19 01:32:02 lhf Exp $

Callers

nothing calls this directly

Calls 8

doargsFunction · 0.70
usageFunction · 0.70
luaL_newstateFunction · 0.70
fatalFunction · 0.70
lua_pushintegerFunction · 0.70
lua_pushlightuserdataFunction · 0.70
lua_closeFunction · 0.70
lua_pcallFunction · 0.50

Tested by

no test coverage detected