summaryrefslogtreecommitdiff
path: root/src/fns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/fns.c b/src/fns.c
index 41429c8863d..8339cdf4cec 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"
static void sort_vector_copy (Lisp_Object, ptrdiff_t,
@@ -2703,7 +2702,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))
@@ -2745,7 +2743,6 @@ This makes STRING unibyte and may change its length. */)
ptrdiff_t len = SBYTES (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);
@@ -4283,16 +4280,12 @@ hash_index_size (struct Lisp_Hash_Table *h, ptrdiff_t size)
size exceeds REHASH_THRESHOLD.
WEAK specifies the weakness of the table. If non-nil, it must be
- one of the symbols `key', `value', `key-or-value', or `key-and-value'.
-
- 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. */
+ one of the symbols `key', `value', `key-or-value', or `key-and-value'. */
Lisp_Object
make_hash_table (struct hash_table_test test, EMACS_INT size,
float rehash_size, float rehash_threshold,
- Lisp_Object weak, bool purecopy)
+ Lisp_Object weak)
{
struct Lisp_Hash_Table *h;
Lisp_Object table;
@@ -4321,7 +4314,6 @@ make_hash_table (struct hash_table_test test, EMACS_INT size,
h->next = make_vector (size, make_fixnum (-1));
h->index = make_vector (hash_index_size (h, size), make_fixnum (-1));
h->next_weak = NULL;
- h->purecopy = purecopy;
h->mutable = true;
/* Set up the free list. */
@@ -4422,11 +4414,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", next_size);
-#endif
}
}
@@ -4489,7 +4476,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));
}
static void
@@ -5013,16 +4999,10 @@ 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.
-
usage: (make-hash-table &rest KEYWORD-ARGS) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
Lisp_Object test, weak;
- bool purecopy;
struct hash_table_test testdesc;
ptrdiff_t i;
USE_SAFE_ALLOCA;
@@ -5056,9 +5036,8 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
testdesc.cmpfn = cmpfn_user_defined;
}
- /* See if there's a `:purecopy PURECOPY' argument. */
- i = get_key_arg (QCpurecopy, nargs, args, used);
- purecopy = i && !NILP (args[i]);
+ /* Ignore a `:purecopy PURECOPY' argument. */
+ get_key_arg (QCpurecopy, nargs, args, used);
/* See if there's a `:size SIZE' argument. */
i = get_key_arg (QCsize, nargs, args, used);
Lisp_Object size_arg = i ? args[i] : Qnil;
@@ -5108,8 +5087,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
signal_error ("Invalid argument list", args[i]);
SAFE_FREE ();
- return make_hash_table (testdesc, size, rehash_size, rehash_threshold, weak,
- purecopy);
+ return make_hash_table (testdesc, size, rehash_size, rehash_threshold, weak);
}