| 36 | |
| 37 | |
| 38 | void 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 | /* |