| 1205 | } |
| 1206 | |
| 1207 | static 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 | |
| 1232 | static int log2_aux (lua_State *L) { |
nothing calls this directly
no test coverage detected