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

Function lua_common_compile

src/Chain/libraries/glua/lapi.cpp:1040–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1038}
1039
1040static int lua_common_compile(lua_State *L, lua_Reader reader, void *dt,
1041 const char *chunkname, const char *mode, lua_Writer writer, void *dest)
1042{
1043 Proto *proto = getproto(L->top - 1);
1044 if (nullptr == dest)
1045 {
1046 perror("compile destination not found");
1047 return LUA_ERRERR;
1048 }
1049 lua_lock(L);
1050 luaU_dump(L, proto, writer, dest, 0);
1051 lua_unlock(L);
1052 return LUA_OK;
1053}
1054
1055/**
1056* compile current lua state to binary

Callers 2

lua_compileFunction · 0.85

Calls 1

luaU_dumpFunction · 0.85

Tested by

no test coverage detected