summaryrefslogtreecommitdiff
path: root/src/alloc.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2017-02-18 22:37:05 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2017-02-18 22:37:05 -0500
commitfe927ecfe45f66ec58d9e7cab6f2526fc87a6803 (patch)
tree2bf00f13cb623dcdebda530dfcef75af69a4a13a /src/alloc.c
parentb2a83eed23d540b4b0ab9e0bf5605821011bfd7d (diff)
downloademacs-fe927ecfe45f66ec58d9e7cab6f2526fc87a6803.tar.gz
Change type of `rehash_threshold' and `pure' fields in hash-tables
* src/lisp.h (struct Lisp_Hash_Table): Change type of `rehash_threshold' and `pure' fields and move them after `count'. * src/fns.c (make_hash_table): Change type of `rehash_threshold' and `pure'. (Fmake_hash_table, Fhash_table_rehash_threshold): * src/category.c (hash_get_category_set): * src/xterm.c (syms_of_xterm): * src/profiler.c (make_log): * src/print.c (print_object): * src/alloc.c (purecopy_hash_table, purecopy): Adjust accordingly.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c
index deb1ca32500..b579e7ed1ae 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5443,7 +5443,7 @@ static struct Lisp_Hash_Table *
purecopy_hash_table (struct Lisp_Hash_Table *table)
{
eassert (NILP (table->weak));
- eassert (!NILP (table->pure));
+ eassert (table->pure);
struct Lisp_Hash_Table *pure = pure_alloc (sizeof *pure, Lisp_Vectorlike);
struct hash_table_test pure_test = table->test;
@@ -5457,14 +5457,14 @@ purecopy_hash_table (struct Lisp_Hash_Table *table)
pure->header = table->header;
pure->weak = purecopy (Qnil);
pure->rehash_size = purecopy (table->rehash_size);
- pure->rehash_threshold = purecopy (table->rehash_threshold);
pure->hash = purecopy (table->hash);
pure->next = purecopy (table->next);
pure->next_free = purecopy (table->next_free);
pure->index = purecopy (table->index);
pure->count = table->count;
+ pure->pure = table->pure;
+ pure->rehash_threshold = table->rehash_threshold;
pure->key_and_value = purecopy (table->key_and_value);
- pure->pure = purecopy (table->pure);
return pure;
}
@@ -5524,7 +5524,7 @@ purecopy (Lisp_Object obj)
/* Do not purify hash tables which haven't been defined with
:purecopy as non-nil or are weak - they aren't guaranteed to
not change. */
- if (!NILP (table->weak) || NILP (table->pure))
+ if (!NILP (table->weak) || !table->pure)
{
/* Instead, add the hash table to the list of pinned objects,
so that it will be marked during GC. */