MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / createmeta

Function createmeta

3rd/lua-5.4.3/src/liolib.c:784–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

782
783
784static void createmeta (lua_State *L) {
785 luaL_newmetatable(L, LUA_FILEHANDLE); /* metatable for file handles */
786 luaL_setfuncs(L, metameth, 0); /* add metamethods to new metatable */
787 luaL_newlibtable(L, meth); /* create method table */
788 luaL_setfuncs(L, meth, 0); /* add file methods to method table */
789 lua_setfield(L, -2, "__index"); /* metatable.__index = method table */
790 lua_pop(L, 1); /* pop metatable */
791}
792
793
794/*

Callers 1

luaopen_ioFunction · 0.85

Calls 3

luaL_newmetatableFunction · 0.85
luaL_setfuncsFunction · 0.85
lua_setfieldFunction · 0.85

Tested by

no test coverage detected