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

Function luaT_init

extlibs/lua/src/ltm.c:38–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36
37
38void luaT_init (lua_State *L) {
39 static const char *const luaT_eventname[] = { /* ORDER TM */
40 "__index", "__newindex",
41 "__gc", "__mode", "__len", "__eq",
42 "__add", "__sub", "__mul", "__mod", "__pow",
43 "__div", "__idiv",
44 "__band", "__bor", "__bxor", "__shl", "__shr",
45 "__unm", "__bnot", "__lt", "__le",
46 "__concat", "__call", "__close"
47 };
48 int i;
49 for (i=0; i<TM_N; i++) {
50 G(L)->tmname[i] = luaS_new(L, luaT_eventname[i]);
51 luaC_fix(L, obj2gco(G(L)->tmname[i])); /* never collect these names */
52 }
53}
54
55
56/*

Callers 1

f_luaopenFunction · 0.85

Calls 2

luaS_newFunction · 0.85
luaC_fixFunction · 0.85

Tested by

no test coverage detected