comparison src/elhash.h @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents aa28d959af41
children d1247f3cc363
comparison
equal deleted inserted replaced
5117:3742ea8250b5 5118:e0db3c197671
23 #ifndef INCLUDED_elhash_h_ 23 #ifndef INCLUDED_elhash_h_
24 #define INCLUDED_elhash_h_ 24 #define INCLUDED_elhash_h_
25 25
26 typedef struct Lisp_Hash_Table Lisp_Hash_Table; 26 typedef struct Lisp_Hash_Table Lisp_Hash_Table;
27 27
28 DECLARE_LRECORD (hash_table, Lisp_Hash_Table); 28 DECLARE_LISP_OBJECT (hash_table, Lisp_Hash_Table);
29 29
30 #define XHASH_TABLE(x) XRECORD (x, hash_table, Lisp_Hash_Table) 30 #define XHASH_TABLE(x) XRECORD (x, hash_table, Lisp_Hash_Table)
31 #define wrap_hash_table(p) wrap_record (p, hash_table) 31 #define wrap_hash_table(p) wrap_record (p, hash_table)
32 #define HASH_TABLEP(x) RECORDP (x, hash_table) 32 #define HASH_TABLEP(x) RECORDP (x, hash_table)
33 #define CHECK_HASH_TABLE(x) CHECK_RECORD (x, hash_table) 33 #define CHECK_HASH_TABLE(x) CHECK_RECORD (x, hash_table)
34 #define CONCHECK_HASH_TABLE(x) CONCHECK_RECORD (x, hash_table) 34 #define CONCHECK_HASH_TABLE(x) CONCHECK_RECORD (x, hash_table)
35
36 typedef struct htentry
37 {
38 #ifdef NEW_GC
39 struct lrecord_header lheader;
40 #endif /* NEW_GC */
41 Lisp_Object key;
42 Lisp_Object value;
43 } htentry;
44
45 #define HTENTRY_CLEAR_P(htentry) ((*(EMACS_UINT*)(&((htentry)->key))) == 0)
46
47 #ifdef NEW_GC
48
49 typedef struct htentry Lisp_Hash_Table_Entry;
50
51 DECLARE_LISP_OBJECT (hash_table_entry, Lisp_Hash_Table_Entry);
52
53 #define XHASH_TABLE_ENTRY(x) \
54 XRECORD (x, hash_table_entry, Lisp_Hash_Table_Entry)
55 #define wrap_hash_table_entry(p) wrap_record (p, hash_table_entry)
56 #define HASH_TABLE_ENTRYP(x) RECORDP (x, hash_table_entry)
57 #define CHECK_HASH_TABLE_ENTRY(x) CHECK_RECORD (x, hash_table_entry)
58 #define CONCHECK_HASH_TABLE_ENTRY(x) CONCHECK_RECORD (x, hash_table_entry)
59 #endif /* NEW_GC */
35 60
36 enum hash_table_weakness 61 enum hash_table_weakness
37 { 62 {
38 HASH_TABLE_NON_WEAK, 63 HASH_TABLE_NON_WEAK,
39 HASH_TABLE_KEY_WEAK, 64 HASH_TABLE_KEY_WEAK,
97 122
98 void pdump_reorganize_hash_table (Lisp_Object); 123 void pdump_reorganize_hash_table (Lisp_Object);
99 124
100 void inchash_eq (Lisp_Object key, Lisp_Object table, EMACS_INT offset); 125 void inchash_eq (Lisp_Object key, Lisp_Object table, EMACS_INT offset);
101 126
127 htentry *find_htentry (Lisp_Object key, const Lisp_Hash_Table *ht);
128
102 #endif /* INCLUDED_elhash_h_ */ 129 #endif /* INCLUDED_elhash_h_ */