diff options
Diffstat (limited to 'src/fns.c')
-rw-r--r-- | src/fns.c | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/src/fns.c b/src/fns.c index 081ed2b9f51..ec1a39fada7 100644 --- a/src/fns.c +++ b/src/fns.c @@ -36,7 +36,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include "buffer.h" #include "intervals.h" #include "window.h" -#include "puresize.h" #include "gnutls.h" #ifdef HAVE_TREE_SITTER @@ -3277,7 +3276,6 @@ ARRAY is a vector, string, char-table, or bool-vector. */) size = SCHARS (array); if (size != 0) { - CHECK_IMPURE (array, XSTRING (array)); unsigned char str[MAX_MULTIBYTE_LENGTH]; int len; if (STRING_MULTIBYTE (array)) @@ -3320,7 +3318,6 @@ removes all text properties. This may change its length. */) Qnil, string); if (len != 0 || STRING_MULTIBYTE (string)) { - CHECK_IMPURE (string, XSTRING (string)); memset (SDATA (string), 0, len); STRING_SET_CHARS (string, len); STRING_SET_UNIBYTE (string); @@ -4862,15 +4859,11 @@ static const hash_idx_t empty_hash_index_vector[] = {-1}; Give the table initial capacity SIZE, 0 <= SIZE <= MOST_POSITIVE_FIXNUM. - WEAK specifies the weakness of the table. - - If PURECOPY is non-nil, the table can be copied to pure storage via - `purecopy' when Emacs is being dumped. Such tables can no longer be - changed after purecopy. */ + WEAK specifies the weakness of the table. */ Lisp_Object make_hash_table (const struct hash_table_test *test, EMACS_INT size, - hash_table_weakness_t weak, bool purecopy) + hash_table_weakness_t weak) { eassert (SYMBOLP (test->name)); eassert (0 <= size && size <= min (MOST_POSITIVE_FIXNUM, PTRDIFF_MAX)); @@ -4916,7 +4909,6 @@ make_hash_table (const struct hash_table_test *test, EMACS_INT size, } h->next_weak = NULL; - h->purecopy = purecopy; h->mutable = true; return make_lisp_hash_table (h); } @@ -5031,11 +5023,6 @@ maybe_resize_hash_table (struct Lisp_Hash_Table *h) set_hash_next_slot (h, i, HASH_INDEX (h, start_of_bucket)); set_hash_index_slot (h, start_of_bucket, i); } - -#ifdef ENABLE_CHECKING - if (HASH_TABLE_P (Vpurify_flag) && XHASH_TABLE (Vpurify_flag) == h) - message ("Growing hash table to: %"pD"d", new_size); -#endif } } @@ -5140,7 +5127,6 @@ check_mutable_hash_table (Lisp_Object obj, struct Lisp_Hash_Table *h) { if (!h->mutable) signal_error ("hash table test modifies table", obj); - eassert (!PURE_P (h)); } /* Put an entry into hash table H that associates KEY with VALUE. @@ -5752,13 +5738,8 @@ key, value, one of key or value, or both key and value, depending on WEAK. WEAK t is equivalent to `key-and-value'. Default value of WEAK is nil. -:purecopy PURECOPY -- If PURECOPY is non-nil, the table can be copied -to pure storage when Emacs is being dumped, making the contents of the -table read only. Any further changes to purified tables will result -in an error. - -The keywords arguments :rehash-threshold and :rehash-size are obsolete -and ignored. +The keywords arguments :rehash-threshold, :rehash-size, and :purecopy +are obsolete and ignored. usage: (make-hash-table &rest KEYWORD-ARGS) */) (ptrdiff_t nargs, Lisp_Object *args) @@ -5766,7 +5747,6 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) Lisp_Object test_arg = Qnil; Lisp_Object weakness_arg = Qnil; Lisp_Object size_arg = Qnil; - Lisp_Object purecopy_arg = Qnil; if (nargs & 1) error ("Odd number of arguments"); @@ -5780,9 +5760,8 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) weakness_arg = arg; else if (BASE_EQ (kw, QCsize)) size_arg = arg; - else if (BASE_EQ (kw, QCpurecopy)) - purecopy_arg = arg; - else if (BASE_EQ (kw, QCrehash_threshold) || BASE_EQ (kw, QCrehash_size)) + else if (BASE_EQ (kw, QCrehash_threshold) || BASE_EQ (kw, QCrehash_size) + || BASE_EQ (kw, QCpurecopy)) ; /* ignore obsolete keyword arguments */ else signal_error ("Invalid keyword argument", kw); @@ -5798,8 +5777,6 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) else test = get_hash_table_user_test (test_arg); - bool purecopy = !NILP (purecopy_arg); - EMACS_INT size; if (NILP (size_arg)) size = DEFAULT_HASH_SIZE; @@ -5822,7 +5799,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */) else signal_error ("Invalid hash table weakness", weakness_arg); - return make_hash_table (test, size, weak, purecopy); + return make_hash_table (test, size, weak); } |