diff options
Diffstat (limited to 'ltm.h')
-rw-r--r-- | ltm.h | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.h,v 1.19 2000/12/26 18:46:09 roberto Exp roberto $ | 2 | ** $Id: ltm.h,v 1.20 2001/01/19 13:20:30 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 | */ |
@@ -35,6 +35,21 @@ typedef enum { | |||
35 | } TMS; | 35 | } TMS; |
36 | 36 | ||
37 | 37 | ||
38 | |||
39 | /* | ||
40 | ** masks for allowable tag methods | ||
41 | */ | ||
42 | #define HAS_TM_GETGLOBAL(L,t) (1<<(t) & ((1<<LUA_TUSERDATA) | \ | ||
43 | (1<<LUA_TTABLE) | \ | ||
44 | (1<<LUA_TNIL))) | ||
45 | |||
46 | #define HAS_TM_SETGLOBAL(L,t) (1<<(t) & ((1<<LUA_TUSERDATA) | \ | ||
47 | (1<<LUA_TTABLE) | \ | ||
48 | (1<<LUA_TNIL) | \ | ||
49 | (1<<LUA_TFUNCTION))) | ||
50 | |||
51 | |||
52 | |||
38 | struct TM { | 53 | struct TM { |
39 | Closure *method[TM_N]; | 54 | Closure *method[TM_N]; |
40 | TString *collected; /* list of garbage-collected udata with this tag */ | 55 | TString *collected; /* list of garbage-collected udata with this tag */ |