summaryrefslogtreecommitdiff
path: root/src/lobject.h
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2004-12-07 12:00:00 +0000
committerrepogen <>2004-12-07 12:00:00 +0000
commit226f7859b5392b6680b7e703f9cc7f7f101fd365 (patch)
tree4345e84719d7f9ccf8d62fa007cbd386f235c58a /src/lobject.h
parentd8fd22e11b391cf183068049bebbee9702c8f78f (diff)
downloadlua-github-226f7859b5392b6680b7e703f9cc7f7f101fd365.tar.gz
Lua 5.1-work35.1-work3
Diffstat (limited to 'src/lobject.h')
-rw-r--r--src/lobject.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/lobject.h b/src/lobject.h
index 4b6a684b..56c0fe8a 100644
--- a/src/lobject.h
+++ b/src/lobject.h
@@ -1,5 +1,5 @@
/*
-** $Id: lobject.h,v 2.5 2004/05/31 18:51:50 roberto Exp $
+** $Id: lobject.h,v 2.8 2004/12/04 18:10:22 roberto Exp $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -25,6 +25,7 @@
*/
#define LUA_TPROTO (NUM_TAGS+1)
#define LUA_TUPVAL (NUM_TAGS+2)
+#define LUA_TDEADKEY (NUM_TAGS+3)
/*
@@ -64,9 +65,11 @@ typedef union {
/*
** Tagged Values
*/
+
+#define TValuefields Value value; int tt
+
typedef struct lua_TValue {
- int tt;
- Value value;
+ TValuefields;
} TValue;
@@ -158,7 +161,7 @@ typedef struct lua_TValue {
#define setobj(L,obj1,obj2) \
{ const TValue *o2=(obj2); TValue *o1=(obj1); \
- o1->tt=o2->tt; o1->value = o2->value; \
+ o1->value = o2->value; o1->tt=o2->tt; \
checkliveness(G(L),o1); }
@@ -308,10 +311,15 @@ typedef union Closure {
** Tables
*/
+typedef struct TKey {
+ TValuefields;
+ struct Node *next; /* for chaining */
+} TKey;
+
+
typedef struct Node {
- TValue i_key;
TValue i_val;
- struct Node *next; /* for chaining */
+ TKey i_key;
} Node;
@@ -345,7 +353,7 @@ extern const TValue luaO_nilobject;
int luaO_log2 (unsigned int x);
int luaO_int2fb (unsigned int x);
-#define fb2int(x) (((x) & 7) << ((x) >> 3))
+int luaO_fb2int (int x);
int luaO_rawequalObj (const TValue *t1, const TValue *t2);
int luaO_str2d (const char *s, lua_Number *result);