MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / createmeta

Function createmeta

lib/lua/src/liolib.c:797–804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795
796
797static void createmeta (lua_State *L) {
798 luaL_newmetatable(L, LUA_FILEHANDLE); /* metatable for file handles */
799 luaL_setfuncs(L, metameth, 0); /* add metamethods to new metatable */
800 luaL_newlibtable(L, meth); /* create method table */
801 luaL_setfuncs(L, meth, 0); /* add file methods to method table */
802 lua_setfield(L, -2, "__index"); /* metatable.__index = method table */
803 lua_pop(L, 1); /* pop metatable */
804}
805
806
807/*

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