| 1384 | } |
| 1385 | |
| 1386 | static bool get_filename(string &fname, |
| 1387 | color_ostream &out, |
| 1388 | blueprint_options opts, // copy because we can't const |
| 1389 | const string &phase, |
| 1390 | int32_t ordinal) { |
| 1391 | const char *s = NULL; |
| 1392 | if (!Lua::CallLuaModuleFunction(out, "plugins.blueprint", "get_filename", |
| 1393 | std::make_tuple(&opts, phase, ordinal), 1, [&](lua_State *L){ |
| 1394 | s = lua_tostring(L, -1); |
| 1395 | })) |
| 1396 | return false; |
| 1397 | |
| 1398 | if (!s) { |
| 1399 | out.printerr("Failed to retrieve filename from get_filename\n"); |
| 1400 | return false; |
| 1401 | } |
| 1402 | |
| 1403 | fname = s; |
| 1404 | return true; |
| 1405 | } |
| 1406 | |
| 1407 | // returns true if we could interface with lua and could verify that the given |
| 1408 | // phase is a meta phase |
no test coverage detected