__weakmode' -> __mode'
This commit is contained in:
6
ltm.c
6
ltm.c
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltm.c,v 1.95 2002/06/13 13:39:55 roberto Exp roberto $
|
** $Id: ltm.c,v 1.96 2002/06/24 20:17:59 roberto Exp roberto $
|
||||||
** Tag methods
|
** Tag methods
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -26,7 +26,7 @@ const char *const luaT_typenames[] = {
|
|||||||
void luaT_init (lua_State *L) {
|
void luaT_init (lua_State *L) {
|
||||||
static const char *const luaT_eventname[] = { /* ORDER TM */
|
static const char *const luaT_eventname[] = { /* ORDER TM */
|
||||||
"__index", "__newindex",
|
"__index", "__newindex",
|
||||||
"__gc", "__eq", "__weakmode",
|
"__gc", "__eq", "__mode",
|
||||||
"__gettable", "__settable",
|
"__gettable", "__settable",
|
||||||
"__add", "__sub", "__mul", "__div",
|
"__add", "__sub", "__mul", "__div",
|
||||||
"__pow", "__unm", "__lt", "__le",
|
"__pow", "__unm", "__lt", "__le",
|
||||||
@@ -46,7 +46,7 @@ void luaT_init (lua_State *L) {
|
|||||||
*/
|
*/
|
||||||
const TObject *luaT_gettm (Table *events, TMS event, TString *ename) {
|
const TObject *luaT_gettm (Table *events, TMS event, TString *ename) {
|
||||||
const TObject *tm = luaH_getstr(events, ename);
|
const TObject *tm = luaH_getstr(events, ename);
|
||||||
lua_assert(event <= TM_WEAKMODE);
|
lua_assert(event <= TM_MODE);
|
||||||
if (ttype(tm) == LUA_TNIL) { /* no tag method? */
|
if (ttype(tm) == LUA_TNIL) { /* no tag method? */
|
||||||
events->flags |= (1u<<event); /* cache this fact */
|
events->flags |= (1u<<event); /* cache this fact */
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
4
ltm.h
4
ltm.h
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltm.h,v 1.35 2002/06/13 13:39:55 roberto Exp roberto $
|
** $Id: ltm.h,v 1.36 2002/06/24 20:17:59 roberto Exp roberto $
|
||||||
** Tag methods
|
** Tag methods
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@@ -19,7 +19,7 @@ typedef enum {
|
|||||||
TM_NEWINDEX,
|
TM_NEWINDEX,
|
||||||
TM_GC,
|
TM_GC,
|
||||||
TM_EQ,
|
TM_EQ,
|
||||||
TM_WEAKMODE, /* last tag method with `fast' access */
|
TM_MODE, /* last tag method with `fast' access */
|
||||||
TM_GETTABLE,
|
TM_GETTABLE,
|
||||||
TM_SETTABLE,
|
TM_SETTABLE,
|
||||||
TM_ADD,
|
TM_ADD,
|
||||||
|
|||||||
Reference in New Issue
Block a user