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

Function luaL_compilefile_to_stream

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

Source from the content-addressed store, hash-verified

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)
2349{
2350 LoadF lf;
2351 struct LuaCompileFilePreloadResult pre_result;
2352 int preload_status = lua_compilefile_preload(L, lf, filename, error, &pre_result, use_type_check, stream, is_contract);
2353 if (preload_status != LUA_OK)
2354 return preload_status;
2355 if (global_glua_chain_api->has_exception(L))
2356 {
2357 return LUA_ERRRUN;
2358 }
2359 int status = lua_compile_to_stream(L, getF, &lf, pre_result.chunk_name, "text", writer_to_stream, stream);
2360 stream->is_bytes = true;
2361 lcompile_error_get(L, error);
2362 return status;
2363}
2364
2365typedef struct LoadS {
2366 const char *s;

Callers 1

compilefile_to_streamFunction · 0.85

Calls 2

lua_compilefile_preloadFunction · 0.85
has_exceptionMethod · 0.45

Tested by

no test coverage detected