MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / doremote

Function doremote

Dependencies/lua/src/ltests.c:1207–1229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1205}
1206
1207static int doremote (lua_State *L) {
1208 lua_State *L1 = getstate(L);
1209 size_t lcode;
1210 const char *code = luaL_checklstring(L, 2, &lcode);
1211 int status;
1212 lua_settop(L1, 0);
1213 status = luaL_loadbuffer(L1, code, lcode, code);
1214 if (status == LUA_OK)
1215 status = lua_pcall(L1, 0, LUA_MULTRET, 0);
1216 if (status != LUA_OK) {
1217 lua_pushnil(L);
1218 lua_pushstring(L, lua_tostring(L1, -1));
1219 lua_pushinteger(L, status);
1220 return 3;
1221 }
1222 else {
1223 int i = 0;
1224 while (!lua_isnone(L1, ++i))
1225 lua_pushstring(L, lua_tostring(L1, i));
1226 lua_pop(L1, i-1);
1227 return i-1;
1228 }
1229}
1230
1231
1232static int log2_aux (lua_State *L) {

Callers

nothing calls this directly

Calls 6

getstateFunction · 0.85
luaL_checklstringFunction · 0.85
lua_settopFunction · 0.85
lua_pushnilFunction · 0.85
lua_pushstringFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected