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

Function luaB_auxwrap

extlibs/lua/src/lcorolib.c:73–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72
73static int luaB_auxwrap (lua_State *L) {
74 lua_State *co = lua_tothread(L, lua_upvalueindex(1));
75 int r = auxresume(L, co, lua_gettop(L));
76 if (r < 0) {
77 int stat = lua_status(co);
78 if (stat != LUA_OK && stat != LUA_YIELD)
79 lua_resetthread(co); /* close variables in case of errors */
80 if (lua_type(L, -1) == LUA_TSTRING) { /* error object is a string? */
81 luaL_where(L, 1); /* add extra info, if available */
82 lua_insert(L, -2);
83 lua_concat(L, 2);
84 }
85 return lua_error(L); /* propagate error */
86 }
87 return r;
88}
89
90
91static int luaB_cocreate (lua_State *L) {

Callers

nothing calls this directly

Calls 9

lua_tothreadFunction · 0.85
auxresumeFunction · 0.85
lua_gettopFunction · 0.85
lua_statusFunction · 0.85
lua_resetthreadFunction · 0.85
lua_typeFunction · 0.85
luaL_whereFunction · 0.85
lua_concatFunction · 0.85
lua_errorFunction · 0.85

Tested by

no test coverage detected