MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaT_init

Function luaT_init

depends/lua/src/ltm.c:37–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

f_luaopenFunction · 0.85

Calls 2

luaS_newFunction · 0.85
luaC_fixFunction · 0.85

Tested by

no test coverage detected