diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-11-19 15:29:23 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-11-19 15:29:23 -0200 |
| commit | 592a3f289b428e3ee5cc595a266607ad7f5d94ff (patch) | |
| tree | 19a371157be240f7e0f579117d04d466e911afcd /ltm.h | |
| parent | 9cdeb275e7c93007b2ece6f81aaeafe530076805 (diff) | |
| download | lua-592a3f289b428e3ee5cc595a266607ad7f5d94ff.tar.gz lua-592a3f289b428e3ee5cc595a266607ad7f5d94ff.tar.bz2 lua-592a3f289b428e3ee5cc595a266607ad7f5d94ff.zip | |
first implementation of centralized global state.
Diffstat (limited to 'ltm.h')
| -rw-r--r-- | ltm.h | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltm.h,v 1.1 1997/09/16 19:25:59 roberto Exp roberto $ | 2 | ** $Id: ltm.h,v 1.2 1997/11/04 15:27:53 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 | */ |
| @@ -9,6 +9,7 @@ | |||
| 9 | 9 | ||
| 10 | 10 | ||
| 11 | #include "lobject.h" | 11 | #include "lobject.h" |
| 12 | #include "lstate.h" | ||
| 12 | 13 | ||
| 13 | /* | 14 | /* |
| 14 | * WARNING: if you change the order of this enumeration, | 15 | * WARNING: if you change the order of this enumeration, |
| @@ -38,12 +39,12 @@ typedef enum { | |||
| 38 | #define IM_N 18 | 39 | #define IM_N 18 |
| 39 | 40 | ||
| 40 | 41 | ||
| 41 | extern struct IM { | 42 | struct IM { |
| 42 | TObject int_method[IM_N]; | 43 | TObject int_method[IM_N]; |
| 43 | } *luaT_IMtable; | 44 | }; |
| 44 | 45 | ||
| 45 | 46 | ||
| 46 | #define luaT_getim(tag,event) (&luaT_IMtable[-(tag)].int_method[event]) | 47 | #define luaT_getim(tag,event) (&L->IMtable[-(tag)].int_method[event]) |
| 47 | #define luaT_getimbyObj(o,e) (luaT_getim(luaT_efectivetag(o),(e))) | 48 | #define luaT_getimbyObj(o,e) (luaT_getim(luaT_efectivetag(o),(e))) |
| 48 | 49 | ||
| 49 | extern char *luaT_eventname[]; | 50 | extern char *luaT_eventname[]; |
