aboutsummaryrefslogtreecommitdiff
path: root/ltm.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-11-14 10:01:35 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-11-14 10:01:35 -0200
commit5c5d9b27031f0a7fcf61df86cd242105c38485d6 (patch)
tree534fb1ea4a4fc82253d5bc8b0af92b91a7ae9714 /ltm.h
parent43d1a6af12fb9cf20e55cc6ba8a1b0231d6b7a3c (diff)
downloadlua-5c5d9b27031f0a7fcf61df86cd242105c38485d6.tar.gz
lua-5c5d9b27031f0a7fcf61df86cd242105c38485d6.tar.bz2
lua-5c5d9b27031f0a7fcf61df86cd242105c38485d6.zip
back to `__mode' metafield to specify weakness
Diffstat (limited to 'ltm.h')
-rw-r--r--ltm.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/ltm.h b/ltm.h
index 09f34a25..4c56a093 100644
--- a/ltm.h
+++ b/ltm.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.h,v 1.39 2002/08/06 17:06:56 roberto Exp roberto $ 2** $Id: ltm.h,v 1.40 2002/09/19 20:12:47 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*/
@@ -19,6 +19,7 @@ typedef enum {
19 TM_INDEX, 19 TM_INDEX,
20 TM_NEWINDEX, 20 TM_NEWINDEX,
21 TM_GC, 21 TM_GC,
22 TM_MODE,
22 TM_EQ, /* last tag method with `fast' access */ 23 TM_EQ, /* last tag method with `fast' access */
23 TM_ADD, 24 TM_ADD,
24 TM_SUB, 25 TM_SUB,
@@ -35,8 +36,10 @@ typedef enum {
35 36
36 37
37 38
38#define fasttm(l,et,e) \ 39#define gfasttm(g,et,e) \
39 (((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, G(l)->tmname[e])) 40 (((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))
41
42#define fasttm(l,et,e) gfasttm(G(l), et, e)
40 43
41 44
42const TObject *luaT_gettm (Table *events, TMS event, TString *ename); 45const TObject *luaT_gettm (Table *events, TMS event, TString *ename);