diff options
| author | Paul Eggert | 2019-07-20 19:40:03 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-07-20 20:13:45 -0700 |
| commit | df5024dbaef5e1f7e39a2a8268523f9fc1af3118 (patch) | |
| tree | 198160b55edc6d82ca64fcb3271333cc5d1f0a75 /src | |
| parent | b0908a0fe6dc4f878b05a8b26ed3ff0c702e26c7 (diff) | |
| download | emacs-df5024dbaef5e1f7e39a2a8268523f9fc1af3118.tar.gz emacs-df5024dbaef5e1f7e39a2a8268523f9fc1af3118.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/alloc.c | 6 | ||||
| -rw-r--r-- | src/fns.c | 10 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/pdumper.c | 2 | ||||
| -rw-r--r-- | src/print.c | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/src/alloc.c b/src/alloc.c index 7a0611dd3e2..8649d4e0f4c 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5329,7 +5329,7 @@ static struct Lisp_Hash_Table * | |||
| 5329 | purecopy_hash_table (struct Lisp_Hash_Table *table) | 5329 | purecopy_hash_table (struct Lisp_Hash_Table *table) |
| 5330 | { | 5330 | { |
| 5331 | eassert (NILP (table->weak)); | 5331 | eassert (NILP (table->weak)); |
| 5332 | eassert (table->pure); | 5332 | eassert (table->purecopy); |
| 5333 | 5333 | ||
| 5334 | struct Lisp_Hash_Table *pure = pure_alloc (sizeof *pure, Lisp_Vectorlike); | 5334 | struct Lisp_Hash_Table *pure = pure_alloc (sizeof *pure, Lisp_Vectorlike); |
| 5335 | struct hash_table_test pure_test = table->test; | 5335 | struct hash_table_test pure_test = table->test; |
| @@ -5346,7 +5346,7 @@ purecopy_hash_table (struct Lisp_Hash_Table *table) | |||
| 5346 | pure->index = purecopy (table->index); | 5346 | pure->index = purecopy (table->index); |
| 5347 | pure->count = table->count; | 5347 | pure->count = table->count; |
| 5348 | pure->next_free = table->next_free; | 5348 | pure->next_free = table->next_free; |
| 5349 | pure->pure = table->pure; | 5349 | pure->purecopy = table->purecopy; |
| 5350 | pure->rehash_threshold = table->rehash_threshold; | 5350 | pure->rehash_threshold = table->rehash_threshold; |
| 5351 | pure->rehash_size = table->rehash_size; | 5351 | pure->rehash_size = table->rehash_size; |
| 5352 | pure->key_and_value = purecopy (table->key_and_value); | 5352 | pure->key_and_value = purecopy (table->key_and_value); |
| @@ -5410,7 +5410,7 @@ purecopy (Lisp_Object obj) | |||
| 5410 | /* Do not purify hash tables which haven't been defined with | 5410 | /* Do not purify hash tables which haven't been defined with |
| 5411 | :purecopy as non-nil or are weak - they aren't guaranteed to | 5411 | :purecopy as non-nil or are weak - they aren't guaranteed to |
| 5412 | not change. */ | 5412 | not change. */ |
| 5413 | if (!NILP (table->weak) || !table->pure) | 5413 | if (!NILP (table->weak) || !table->purecopy) |
| 5414 | { | 5414 | { |
| 5415 | /* Instead, add the hash table to the list of pinned objects, | 5415 | /* Instead, add the hash table to the list of pinned objects, |
| 5416 | so that it will be marked during GC. */ | 5416 | so that it will be marked during GC. */ |
| @@ -4055,7 +4055,7 @@ allocate_hash_table (void) | |||
| 4055 | Lisp_Object | 4055 | Lisp_Object |
| 4056 | make_hash_table (struct hash_table_test test, EMACS_INT size, | 4056 | make_hash_table (struct hash_table_test test, EMACS_INT size, |
| 4057 | float rehash_size, float rehash_threshold, | 4057 | float rehash_size, float rehash_threshold, |
| 4058 | Lisp_Object weak, bool pure) | 4058 | Lisp_Object weak, bool purecopy) |
| 4059 | { | 4059 | { |
| 4060 | struct Lisp_Hash_Table *h; | 4060 | struct Lisp_Hash_Table *h; |
| 4061 | Lisp_Object table; | 4061 | Lisp_Object table; |
| @@ -4094,7 +4094,7 @@ make_hash_table (struct hash_table_test test, EMACS_INT size, | |||
| 4094 | h->next = make_vector (size, make_fixnum (-1)); | 4094 | h->next = make_vector (size, make_fixnum (-1)); |
| 4095 | h->index = make_vector (index_size, make_fixnum (-1)); | 4095 | h->index = make_vector (index_size, make_fixnum (-1)); |
| 4096 | h->next_weak = NULL; | 4096 | h->next_weak = NULL; |
| 4097 | h->pure = pure; | 4097 | h->purecopy = purecopy; |
| 4098 | 4098 | ||
| 4099 | /* Set up the free list. */ | 4099 | /* Set up the free list. */ |
| 4100 | for (i = 0; i < size - 1; ++i) | 4100 | for (i = 0; i < size - 1; ++i) |
| @@ -4748,7 +4748,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4748 | (ptrdiff_t nargs, Lisp_Object *args) | 4748 | (ptrdiff_t nargs, Lisp_Object *args) |
| 4749 | { | 4749 | { |
| 4750 | Lisp_Object test, weak; | 4750 | Lisp_Object test, weak; |
| 4751 | bool pure; | 4751 | bool purecopy; |
| 4752 | struct hash_table_test testdesc; | 4752 | struct hash_table_test testdesc; |
| 4753 | ptrdiff_t i; | 4753 | ptrdiff_t i; |
| 4754 | USE_SAFE_ALLOCA; | 4754 | USE_SAFE_ALLOCA; |
| @@ -4784,7 +4784,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4784 | 4784 | ||
| 4785 | /* See if there's a `:purecopy PURECOPY' argument. */ | 4785 | /* See if there's a `:purecopy PURECOPY' argument. */ |
| 4786 | i = get_key_arg (QCpurecopy, nargs, args, used); | 4786 | i = get_key_arg (QCpurecopy, nargs, args, used); |
| 4787 | pure = i && !NILP (args[i]); | 4787 | purecopy = i && !NILP (args[i]); |
| 4788 | /* See if there's a `:size SIZE' argument. */ | 4788 | /* See if there's a `:size SIZE' argument. */ |
| 4789 | i = get_key_arg (QCsize, nargs, args, used); | 4789 | i = get_key_arg (QCsize, nargs, args, used); |
| 4790 | Lisp_Object size_arg = i ? args[i] : Qnil; | 4790 | Lisp_Object size_arg = i ? args[i] : Qnil; |
| @@ -4835,7 +4835,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) | |||
| 4835 | 4835 | ||
| 4836 | SAFE_FREE (); | 4836 | SAFE_FREE (); |
| 4837 | return make_hash_table (testdesc, size, rehash_size, rehash_threshold, weak, | 4837 | return make_hash_table (testdesc, size, rehash_size, rehash_threshold, weak, |
| 4838 | pure); | 4838 | purecopy); |
| 4839 | } | 4839 | } |
| 4840 | 4840 | ||
| 4841 | 4841 | ||
diff --git a/src/lisp.h b/src/lisp.h index 13014c82dc3..8f60963eb7e 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2287,7 +2287,7 @@ struct Lisp_Hash_Table | |||
| 2287 | 2287 | ||
| 2288 | /* True if the table can be purecopied. The table cannot be | 2288 | /* True if the table can be purecopied. The table cannot be |
| 2289 | changed afterwards. */ | 2289 | changed afterwards. */ |
| 2290 | bool pure; | 2290 | bool purecopy; |
| 2291 | 2291 | ||
| 2292 | /* Resize hash table when number of entries / table size is >= this | 2292 | /* Resize hash table when number of entries / table size is >= this |
| 2293 | ratio. */ | 2293 | ratio. */ |
diff --git a/src/pdumper.c b/src/pdumper.c index 03c00bf27b7..206a1968909 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -2741,7 +2741,7 @@ dump_hash_table (struct dump_context *ctx, | |||
| 2741 | them as close to the hash table as possible. */ | 2741 | them as close to the hash table as possible. */ |
| 2742 | DUMP_FIELD_COPY (out, hash, count); | 2742 | DUMP_FIELD_COPY (out, hash, count); |
| 2743 | DUMP_FIELD_COPY (out, hash, next_free); | 2743 | DUMP_FIELD_COPY (out, hash, next_free); |
| 2744 | DUMP_FIELD_COPY (out, hash, pure); | 2744 | DUMP_FIELD_COPY (out, hash, purecopy); |
| 2745 | DUMP_FIELD_COPY (out, hash, rehash_threshold); | 2745 | DUMP_FIELD_COPY (out, hash, rehash_threshold); |
| 2746 | DUMP_FIELD_COPY (out, hash, rehash_size); | 2746 | DUMP_FIELD_COPY (out, hash, rehash_size); |
| 2747 | dump_field_lv (ctx, out, hash, &hash->key_and_value, WEIGHT_STRONG); | 2747 | dump_field_lv (ctx, out, hash, &hash->key_and_value, WEIGHT_STRONG); |
diff --git a/src/print.c b/src/print.c index 6623244c598..cb340905142 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1575,10 +1575,10 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag, | |||
| 1575 | print_object (Fhash_table_rehash_threshold (obj), | 1575 | print_object (Fhash_table_rehash_threshold (obj), |
| 1576 | printcharfun, escapeflag); | 1576 | printcharfun, escapeflag); |
| 1577 | 1577 | ||
| 1578 | if (h->pure) | 1578 | if (h->purecopy) |
| 1579 | { | 1579 | { |
| 1580 | print_c_string (" purecopy ", printcharfun); | 1580 | print_c_string (" purecopy ", printcharfun); |
| 1581 | print_object (h->pure ? Qt : Qnil, printcharfun, escapeflag); | 1581 | print_object (h->purecopy ? Qt : Qnil, printcharfun, escapeflag); |
| 1582 | } | 1582 | } |
| 1583 | 1583 | ||
| 1584 | print_c_string (" data ", printcharfun); | 1584 | print_c_string (" data ", printcharfun); |