Commit df5024db authored by Paul Eggert's avatar Paul Eggert

Rename ‘pure’ to ‘purecopy’

* src/lisp.h (struct Lisp_Hash_Table): Rename ‘pure’ member to
‘purecopy’, as the old name was quite confusing (it did not
mean the hash table was pure).  All uses changed.
parent b0908a0f
......@@ -5329,7 +5329,7 @@ static struct Lisp_Hash_Table *
purecopy_hash_table (struct Lisp_Hash_Table *table)
{
eassert (NILP (table->weak));
eassert (table->pure);
eassert (table->purecopy);
struct Lisp_Hash_Table *pure = pure_alloc (sizeof *pure, Lisp_Vectorlike);
struct hash_table_test pure_test = table->test;
......@@ -5346,7 +5346,7 @@ purecopy_hash_table (struct Lisp_Hash_Table *table)
pure->index = purecopy (table->index);
pure->count = table->count;
pure->next_free = table->next_free;
pure->pure = table->pure;
pure->purecopy = table->purecopy;
pure->rehash_threshold = table->rehash_threshold;
pure->rehash_size = table->rehash_size;
pure->key_and_value = purecopy (table->key_and_value);
......@@ -5410,7 +5410,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) || !table->pure)
if (!NILP (table->weak) || !table->purecopy)
{
/* Instead, add the hash table to the list of pinned objects,
so that it will be marked during GC. */
......
......@@ -4055,7 +4055,7 @@ allocate_hash_table (void)
Lisp_Object
make_hash_table (struct hash_table_test test, EMACS_INT size,
float rehash_size, float rehash_threshold,
Lisp_Object weak, bool pure)
Lisp_Object weak, bool purecopy)
{
struct Lisp_Hash_Table *h;
Lisp_Object table;
......@@ -4094,7 +4094,7 @@ make_hash_table (struct hash_table_test test, EMACS_INT size,
h->next = make_vector (size, make_fixnum (-1));
h->index = make_vector (index_size, make_fixnum (-1));
h->next_weak = NULL;
h->pure = pure;
h->purecopy = purecopy;
/* Set up the free list. */
for (i = 0; i < size - 1; ++i)
......@@ -4748,7 +4748,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
Lisp_Object test, weak;
bool pure;
bool purecopy;
struct hash_table_test testdesc;
ptrdiff_t i;
USE_SAFE_ALLOCA;
......@@ -4784,7 +4784,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
/* See if there's a `:purecopy PURECOPY' argument. */
i = get_key_arg (QCpurecopy, nargs, args, used);
pure = i && !NILP (args[i]);
purecopy = i && !NILP (args[i]);
/* See if there's a `:size SIZE' argument. */
i = get_key_arg (QCsize, nargs, args, used);
Lisp_Object size_arg = i ? args[i] : Qnil;
......@@ -4835,7 +4835,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
SAFE_FREE ();
return make_hash_table (testdesc, size, rehash_size, rehash_threshold, weak,
pure);
purecopy);
}
......
......@@ -2287,7 +2287,7 @@ struct Lisp_Hash_Table
/* True if the table can be purecopied. The table cannot be
changed afterwards. */
bool pure;
bool purecopy;
/* Resize hash table when number of entries / table size is >= this
ratio. */
......
......@@ -2741,7 +2741,7 @@ dump_hash_table (struct dump_context *ctx,
them as close to the hash table as possible. */
DUMP_FIELD_COPY (out, hash, count);
DUMP_FIELD_COPY (out, hash, next_free);
DUMP_FIELD_COPY (out, hash, pure);
DUMP_FIELD_COPY (out, hash, purecopy);
DUMP_FIELD_COPY (out, hash, rehash_threshold);
DUMP_FIELD_COPY (out, hash, rehash_size);
dump_field_lv (ctx, out, hash, &hash->key_and_value, WEIGHT_STRONG);
......
......@@ -1575,10 +1575,10 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
print_object (Fhash_table_rehash_threshold (obj),
printcharfun, escapeflag);
if (h->pure)
if (h->purecopy)
{
print_c_string (" purecopy ", printcharfun);
print_object (h->pure ? Qt : Qnil, printcharfun, escapeflag);
print_object (h->purecopy ? Qt : Qnil, printcharfun, escapeflag);
}
print_c_string (" data ", printcharfun);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment