aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorStefan Monnier2007-10-02 21:24:47 +0000
committerStefan Monnier2007-10-02 21:24:47 +0000
commit878f97ffedc5b4fc785beac809c3d4392f531eca (patch)
tree862d3533e412791972f9fd44fa4072d8173ff357 /src/lisp.h
parent5b2f56dfa64ff88188ece5093589a52542163e46 (diff)
downloademacs-878f97ffedc5b4fc785beac809c3d4392f531eca.tar.gz
emacs-878f97ffedc5b4fc785beac809c3d4392f531eca.zip
* lisp.h (struct Lisp_Hash_Table): Move non-traced elements at the end.
Turn `count' into an integer. * fns.c (make_hash_table, hash_put, hash_remove, hash_clear) (sweep_weak_table, sweep_weak_hash_tables, Fhash_table_count): * print.c (print_object) <HASH_TABLE_P>: `count' is an int. * alloc.c (allocate_hash_table): Use ALLOCATE_PSEUDOVECTOR. (mark_object) <HASH_TABLE_P>: Use mark_vectorlike.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 5917e918b31..6dd24813f0e 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1019,13 +1019,6 @@ struct Lisp_Hash_Table
1019 ratio, a float. */ 1019 ratio, a float. */
1020 Lisp_Object rehash_threshold; 1020 Lisp_Object rehash_threshold;
1021 1021
1022 /* Number of key/value entries in the table. */
1023 Lisp_Object count;
1024
1025 /* Vector of keys and values. The key of item I is found at index
1026 2 * I, the value is found at index 2 * I + 1. */
1027 Lisp_Object key_and_value;
1028
1029 /* Vector of hash codes.. If hash[I] is nil, this means that that 1022 /* Vector of hash codes.. If hash[I] is nil, this means that that
1030 entry I is unused. */ 1023 entry I is unused. */
1031 Lisp_Object hash; 1024 Lisp_Object hash;
@@ -1049,6 +1042,18 @@ struct Lisp_Hash_Table
1049 /* User-supplied key comparison function, or nil. */ 1042 /* User-supplied key comparison function, or nil. */
1050 Lisp_Object user_cmp_function; 1043 Lisp_Object user_cmp_function;
1051 1044
1045 /* Only the fields above are traced normally by the GC. The ones below
1046 `count'. are special and are either ignored by the GC or traced in
1047 a special way (e.g. because of weakness). */
1048
1049 /* Number of key/value entries in the table. */
1050 unsigned int count;
1051
1052 /* Vector of keys and values. The key of item I is found at index
1053 2 * I, the value is found at index 2 * I + 1.
1054 This is gc_marked specially if the table is weak. */
1055 Lisp_Object key_and_value;
1056
1052 /* Next weak hash table if this is a weak hash table. The head 1057 /* Next weak hash table if this is a weak hash table. The head
1053 of the list is in weak_hash_tables. */ 1058 of the list is in weak_hash_tables. */
1054 struct Lisp_Hash_Table *next_weak; 1059 struct Lisp_Hash_Table *next_weak;