| 2315 | } |
| 2316 | |
| 2317 | LUA_API int luaL_compilefilex(const char *filename, FILE *out_file, char *error, bool is_contract) |
| 2318 | { |
| 2319 | thinkyoung::lua::lib::GluaStateScope scope; |
| 2320 | lua_State* L = scope.L(); |
| 2321 | LoadF lf; |
| 2322 | struct LuaCompileFilePreloadResult pre_result; |
| 2323 | int preload_status = lua_compilefile_preload(L, lf, filename, error, &pre_result, false, nullptr, is_contract); |
| 2324 | if (preload_status != LUA_OK) |
| 2325 | return preload_status; |
| 2326 | int result_status = lua_compile(L, getF, &lf, pre_result.chunk_name, "text", writer, out_file); |
| 2327 | return result_status; |
| 2328 | } |
| 2329 | |
| 2330 | /** |
| 2331 | * copied code from luaL_compilefilex |
nothing calls this directly
no test coverage detected