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

Function luaL_newstate

extlibs/lua/src/lauxlib.c:1033–1044  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1031
1032
1033LUALIB_API lua_State *luaL_newstate (void) {
1034 lua_State *L = lua_newstate(l_alloc, NULL);
1035 if (L) {
1036 int *warnstate; /* space for warning state */
1037 lua_atpanic(L, &panic);
1038 warnstate = (int *)lua_newuserdatauv(L, sizeof(int), 0);
1039 luaL_ref(L, LUA_REGISTRYINDEX); /* make sure it won't be collected */
1040 *warnstate = 0; /* default is warnings off */
1041 lua_setwarnf(L, warnf, warnstate);
1042 }
1043 return L;
1044}
1045
1046
1047LUALIB_API void luaL_checkversion_ (lua_State *L, lua_Number ver, size_t sz) {

Callers 3

mainFunction · 0.85
mainFunction · 0.85
stateMethod · 0.85

Calls 4

lua_newstateFunction · 0.85
lua_newuserdatauvFunction · 0.85
luaL_refFunction · 0.85
lua_setwarnfFunction · 0.85

Tested by

no test coverage detected