MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / createstdfile

Function createstdfile

extlibs/lua/src/liolib.c:791–801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

789
790
791static void createstdfile (lua_State *L, FILE *f, const char *k,
792 const char *fname) {
793 LStream *p = newprefile(L);
794 p->f = f;
795 p->closef = &io_noclose;
796 if (k != NULL) {
797 lua_pushvalue(L, -1);
798 lua_setfield(L, LUA_REGISTRYINDEX, k); /* add file to registry */
799 }
800 lua_setfield(L, -2, fname); /* add file to module */
801}
802
803
804LUAMOD_API int luaopen_io (lua_State *L) {

Callers 1

luaopen_ioFunction · 0.85

Calls 3

newprefileFunction · 0.85
lua_pushvalueFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected