MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaL_compilefile

Function luaL_compilefile

src/Chain/libraries/glua/lauxlib.cpp:2333–2345  ·  view source on GitHub ↗

* copied code from luaL_compilefilex */

Source from the content-addressed store, hash-verified

2331 * copied code from luaL_compilefilex
2332 */
2333LUA_API int luaL_compilefile(const char *filename, const char *out_filename, char *error, bool use_type_check, bool is_contract)
2334{
2335 thinkyoung::lua::lib::GluaStateScope scope;
2336 lua_State* L = scope.L();
2337 LoadF lf;
2338 struct LuaCompileFilePreloadResult pre_result;
2339 int preload_status = lua_compilefile_preload(L, lf, filename, error, &pre_result, use_type_check, nullptr, is_contract);
2340 if (preload_status != LUA_OK)
2341 return preload_status;
2342 int result_status = lua_compilex(L, getF, &lf, pre_result.chunk_name, "text", writer, out_filename);
2343 lcompile_error_get(L, error);
2344 return result_status;
2345}
2346
2347LUA_API int luaL_compilefile_to_stream(lua_State *L, const char *filename,
2348 GluaModuleByteStreamP stream, char *error, bool use_type_check, bool is_contract)

Callers 1

compilefile_to_fileFunction · 0.85

Calls 3

lua_compilefile_preloadFunction · 0.85
lua_compilexFunction · 0.85
LMethod · 0.80

Tested by

no test coverage detected