diff options
Diffstat (limited to 'ltm.h')
-rw-r--r-- | ltm.h | 52 |
1 files changed, 26 insertions, 26 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.h,v 1.16 2000/10/03 14:27:44 roberto Exp roberto $ | 2 | ** $Id: ltm.h,v 1.17 2000/10/05 12:14:08 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -13,36 +13,36 @@ | |||
13 | 13 | ||
14 | /* | 14 | /* |
15 | * WARNING: if you change the order of this enumeration, | 15 | * WARNING: if you change the order of this enumeration, |
16 | * grep "ORDER IM" | 16 | * grep "ORDER TM" |
17 | */ | 17 | */ |
18 | typedef enum { | 18 | typedef enum { |
19 | IM_GETTABLE = 0, | 19 | TM_GETTABLE = 0, |
20 | IM_SETTABLE, | 20 | TM_SETTABLE, |
21 | IM_INDEX, | 21 | TM_INDEX, |
22 | IM_GETGLOBAL, | 22 | TM_GETGLOBAL, |
23 | IM_SETGLOBAL, | 23 | TM_SETGLOBAL, |
24 | IM_ADD, | 24 | TM_ADD, |
25 | IM_SUB, | 25 | TM_SUB, |
26 | IM_MUL, | 26 | TM_MUL, |
27 | IM_DIV, | 27 | TM_DIV, |
28 | IM_POW, | 28 | TM_POW, |
29 | IM_UNM, | 29 | TM_UNM, |
30 | IM_LT, | 30 | TM_LT, |
31 | IM_CONCAT, | 31 | TM_CONCAT, |
32 | IM_GC, | 32 | TM_GC, |
33 | IM_FUNCTION, | 33 | TM_FUNCTION, |
34 | IM_N /* number of elements in the enum */ | 34 | TM_N /* number of elements in the enum */ |
35 | } IMS; | 35 | } TMS; |
36 | 36 | ||
37 | 37 | ||
38 | struct IM { | 38 | struct TM { |
39 | TObject int_method[IM_N]; | 39 | Closure *method[TM_N]; |
40 | TString *collected; /* list of G. collected udata with this tag */ | 40 | TString *collected; /* list of garbage-collected udata with this tag */ |
41 | }; | 41 | }; |
42 | 42 | ||
43 | 43 | ||
44 | #define luaT_getim(L,tag,event) (&L->IMtable[tag].int_method[event]) | 44 | #define luaT_gettm(L,tag,event) (L->TMtable[tag].method[event]) |
45 | #define luaT_getimbyObj(L,o,e) (luaT_getim((L),luaT_tag(o),(e))) | 45 | #define luaT_gettmbyObj(L,o,e) (luaT_gettm((L),luaT_tag(o),(e))) |
46 | 46 | ||
47 | 47 | ||
48 | #define validtag(t) (NUM_TAGS <= (t) && (t) <= L->last_tag) | 48 | #define validtag(t) (NUM_TAGS <= (t) && (t) <= L->last_tag) |