MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / createmeta

Function createmeta

deps/lua/src/liolib.c:510–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508
509
510static void createmeta (lua_State *L) {
511 luaL_newmetatable(L, LUA_FILEHANDLE); /* create metatable for file handles */
512 lua_pushvalue(L, -1); /* push metatable */
513 lua_setfield(L, -2, "__index"); /* metatable.__index = metatable */
514 luaL_register(L, NULL, flib); /* file methods */
515}
516
517
518static void createstdfile (lua_State *L, FILE *f, int k, const char *fname) {

Callers 1

luaopen_ioFunction · 0.85

Calls 3

luaL_newmetatableFunction · 0.85
lua_pushvalueFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected