commit fdfd5b44ee48a5497181d0bcaa89586b12a48eb4
parent 1a4c428d6d2c9c9a35ceb7d4fb054f83c89f98e5
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Mon, 24 Jun 2002 17:18:16 -0300
TM_GETTABLE/TM_SETTABLE don't need fast access anymore
Diffstat:
4 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/lobject.h b/lobject.h
@@ -1,5 +1,5 @@
/*
-** $Id: lobject.h,v 1.136 2002/06/20 20:41:46 roberto Exp roberto $
+** $Id: lobject.h,v 1.137 2002/06/24 13:08:45 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -212,7 +212,7 @@ typedef struct Table {
struct Table *next;
struct Table *mark; /* marked tables (point to itself when not marked) */
int sizearray; /* size of `array' array */
- unsigned short flags; /* 1<<p means tagmethod(p) is not present */
+ lu_byte flags; /* 1<<p means tagmethod(p) is not present */
lu_byte lsizenode; /* log2 of size of `node' array */
} Table;
diff --git a/ltable.c b/ltable.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltable.c,v 1.109 2002/05/27 20:35:40 roberto Exp roberto $
+** $Id: ltable.c,v 1.110 2002/06/13 13:39:55 roberto Exp roberto $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -302,7 +302,7 @@ Table *luaH_new (lua_State *L, int narray, int lnhash) {
t->next = G(L)->roottable;
G(L)->roottable = t;
t->mark = t;
- t->flags = cast(unsigned short, ~0);
+ t->flags = cast(lu_byte, ~0);
/* temporary values (kept only if some malloc fails) */
t->array = NULL;
t->sizearray = 0;
diff --git a/ltm.c b/ltm.c
@@ -1,5 +1,5 @@
/*
-** $Id: ltm.c,v 1.94 2002/06/12 14:51:31 roberto Exp roberto $
+** $Id: ltm.c,v 1.95 2002/06/13 13:39:55 roberto Exp roberto $
** Tag methods
** See Copyright Notice in lua.h
*/
@@ -25,8 +25,9 @@ const char *const luaT_typenames[] = {
void luaT_init (lua_State *L) {
static const char *const luaT_eventname[] = { /* ORDER TM */
- "__gettable", "__settable", "__index", "__newindex",
+ "__index", "__newindex",
"__gc", "__eq", "__weakmode",
+ "__gettable", "__settable",
"__add", "__sub", "__mul", "__div",
"__pow", "__unm", "__lt", "__le",
"__concat", "__call"
diff --git a/ltm.h b/ltm.h
@@ -1,5 +1,5 @@
/*
-** $Id: ltm.h,v 1.34 2002/06/12 14:51:31 roberto Exp roberto $
+** $Id: ltm.h,v 1.35 2002/06/13 13:39:55 roberto Exp roberto $
** Tag methods
** See Copyright Notice in lua.h
*/
@@ -15,13 +15,13 @@
* grep "ORDER TM"
*/
typedef enum {
- TM_GETTABLE = 0,
- TM_SETTABLE,
TM_INDEX,
TM_NEWINDEX,
TM_GC,
TM_EQ,
TM_WEAKMODE, /* last tag method with `fast' access */
+ TM_GETTABLE,
+ TM_SETTABLE,
TM_ADD,
TM_SUB,
TM_MUL,