summaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-06 14:06:56 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-08-06 14:06:56 -0300
commit634344d61fb4bd7ebd033d37b814a0083e55b5a2 (patch)
tree01794c51e00c7ec1faec1e08fe2963ee75b1a139 /ltm.c
parenta2fa48a570b01b2a2cd37f01799f08f693fc5892 (diff)
downloadlua-634344d61fb4bd7ebd033d37b814a0083e55b5a2.tar.gz
lua-634344d61fb4bd7ebd033d37b814a0083e55b5a2.tar.bz2
lua-634344d61fb4bd7ebd033d37b814a0083e55b5a2.zip
new API for weak mode
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltm.c b/ltm.c
index 70fd9807..cd70f6ba 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 1.98 2002/07/17 16:25:13 roberto Exp $ 2** $Id: ltm.c,v 1.99 2002/08/05 14:09:06 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*/
@@ -26,7 +26,7 @@ const char *const luaT_typenames[] = {
26void luaT_init (lua_State *L) { 26void luaT_init (lua_State *L) {
27 static const char *const luaT_eventname[] = { /* ORDER TM */ 27 static const char *const luaT_eventname[] = { /* ORDER TM */
28 "__index", "__newindex", 28 "__index", "__newindex",
29 "__gc", "__eq", "__mode", 29 "__gc", "__eq",
30 "__gettable", "__settable", 30 "__gettable", "__settable",
31 "__add", "__sub", "__mul", "__div", 31 "__add", "__sub", "__mul", "__div",
32 "__pow", "__unm", "__lt", "__le", 32 "__pow", "__unm", "__lt", "__le",
@@ -46,7 +46,7 @@ void luaT_init (lua_State *L) {
46*/ 46*/
47const TObject *luaT_gettm (Table *events, TMS event, TString *ename) { 47const TObject *luaT_gettm (Table *events, TMS event, TString *ename) {
48 const TObject *tm = luaH_getstr(events, ename); 48 const TObject *tm = luaH_getstr(events, ename);
49 lua_assert(event <= TM_MODE); 49 lua_assert(event <= TM_EQ);
50 if (ttisnil(tm)) { /* no tag method? */ 50 if (ttisnil(tm)) { /* no tag method? */
51 events->flags |= (1u<<event); /* cache this fact */ 51 events->flags |= (1u<<event); /* cache this fact */
52 return NULL; 52 return NULL;