MCPcopy Create free account
hub / github.com/Tencent/UnLua / Lio_dump

Function Lio_dump

Plugins/UnLuaExtensions/LuaProtobuf/Source/src/pb.cpp:572–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

570}
571
572static int Lio_dump(lua_State *L) {
573 int res;
574 const char *fname = luaL_checkstring(L, 1);
575 FILE *fp = fopen(fname, "wb");
576 if (fp == NULL) return luaL_fileresult(L, 0, fname);
577 res = io_write(L, fp, 2);
578 fclose(fp);
579 return res;
580}
581
582LUALIB_API int luaopen_pb_io(lua_State *L) {
583 luaL_Reg libs[] = {

Callers

nothing calls this directly

Calls 2

luaL_fileresultFunction · 0.70
io_writeFunction · 0.70

Tested by

no test coverage detected