diff options
| author | Pip Cet | 2024-08-20 19:00:20 +0000 |
|---|---|---|
| committer | Stefan Kangas | 2024-12-12 22:48:11 +0100 |
| commit | 5ec86966638885a0f8df8afa28a01ca103ad2a49 (patch) | |
| tree | ce1d613e653327b7cc366fe46dbf75e53096fd44 /src/data.c | |
| parent | f84ccff5a6275782a37534ed55b706db35f228ac (diff) | |
| download | emacs-5ec86966638885a0f8df8afa28a01ca103ad2a49.tar.gz emacs-5ec86966638885a0f8df8afa28a01ca103ad2a49.zip | |
Pure storage removal: Replace calls to removed functions
* src/alloc.c (string_bytes, pin_string, valid_lisp_object_p)
(process_mark_stack, survives_gc_p, syms_of_alloc):
* src/androidterm.c (android_term_init): Replace call to
'build_pure_c_string'.
* src/buffer.c (init_buffer_once, syms_of_buffer):
* src/bytecode.c (exec_byte_code):
* src/callint.c (syms_of_callint):
* src/callproc.c (syms_of_callproc):
* src/category.c (Fdefine_category):
* src/coding.c (syms_of_coding):
* src/comp.c (Fcomp__compile_ctxt_to_file0)
(maybe_defer_native_compilation, syms_of_comp):
* src/data.c (Fsetcar, Fsetcdr, Fdefalias, Faset, syms_of_data):
* src/dbusbind.c (syms_of_dbusbind):
* src/doc.c (Fsnarf_documentation):
* src/emacs-module.c (syms_of_module):
* src/eval.c (Finternal__define_uninitialized_variable)
(Fdefconst_1, define_error, syms_of_eval):
* src/fileio.c (syms_of_fileio):
* src/fns.c (Ffillarray, Fclear_string, check_mutable_hash_table):
* src/fontset.c (syms_of_fontset):
* src/frame.c (make_initial_frame):
* src/haikufns.c (syms_of_haikufns):
* src/intervals.c (create_root_interval):
* src/keyboard.c (syms_of_keyboard):
* src/keymap.c (Fmake_sparse_keymap, Fset_keymap_parent)
(store_in_keymap, syms_of_keymap):
* src/lisp.h:
* src/lread.c (Fload, read0, intern_c_string_1, define_symbol)
(Fintern, defsubr, syms_of_lread):
* src/pdumper.c (Fdump_emacs_portable):
* src/pgtkfns.c (syms_of_pgtkfns):
* src/pgtkterm.c (syms_of_pgtkterm):
* src/process.c (syms_of_process):
* src/search.c (syms_of_search):
* src/sqlite.c (syms_of_sqlite):
* src/syntax.c (syms_of_syntax):
* src/treesit.c (syms_of_treesit):
* src/w32fns.c (syms_of_w32fns):
* src/xdisp.c (syms_of_xdisp):
* src/xfaces.c (syms_of_xfaces):
* src/xfns.c (syms_of_xfns):
* src/xftfont.c (syms_of_xftfont):
* src/xterm.c (syms_of_xterm): Remove calls to 'PURE_P', 'CHECK_IMPURE',
'Fpurecopy', and replace calls to 'build_pure_c_string', 'pure_list',
'pure_listn', etc., by impure equivalents.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/src/data.c b/src/data.c index 95c1d857964..9492c8041c8 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -687,7 +687,6 @@ DEFUN ("setcar", Fsetcar, Ssetcar, 2, 2, 0, | |||
| 687 | (register Lisp_Object cell, Lisp_Object newcar) | 687 | (register Lisp_Object cell, Lisp_Object newcar) |
| 688 | { | 688 | { |
| 689 | CHECK_CONS (cell); | 689 | CHECK_CONS (cell); |
| 690 | CHECK_IMPURE (cell, XCONS (cell)); | ||
| 691 | XSETCAR (cell, newcar); | 690 | XSETCAR (cell, newcar); |
| 692 | return newcar; | 691 | return newcar; |
| 693 | } | 692 | } |
| @@ -697,7 +696,6 @@ DEFUN ("setcdr", Fsetcdr, Ssetcdr, 2, 2, 0, | |||
| 697 | (register Lisp_Object cell, Lisp_Object newcdr) | 696 | (register Lisp_Object cell, Lisp_Object newcdr) |
| 698 | { | 697 | { |
| 699 | CHECK_CONS (cell); | 698 | CHECK_CONS (cell); |
| 700 | CHECK_IMPURE (cell, XCONS (cell)); | ||
| 701 | XSETCDR (cell, newcdr); | 699 | XSETCDR (cell, newcdr); |
| 702 | return newcdr; | 700 | return newcdr; |
| 703 | } | 701 | } |
| @@ -995,10 +993,6 @@ The return value is undefined. */) | |||
| 995 | (register Lisp_Object symbol, Lisp_Object definition, Lisp_Object docstring) | 993 | (register Lisp_Object symbol, Lisp_Object definition, Lisp_Object docstring) |
| 996 | { | 994 | { |
| 997 | CHECK_SYMBOL (symbol); | 995 | CHECK_SYMBOL (symbol); |
| 998 | if (!NILP (Vpurify_flag) | ||
| 999 | /* If `definition' is a keymap, immutable (and copying) is wrong. */ | ||
| 1000 | && !KEYMAPP (definition)) | ||
| 1001 | definition = Fpurecopy (definition); | ||
| 1002 | 996 | ||
| 1003 | defalias (symbol, definition); | 997 | defalias (symbol, definition); |
| 1004 | 998 | ||
| @@ -2588,7 +2582,6 @@ bool-vector. IDX starts at 0. */) | |||
| 2588 | 2582 | ||
| 2589 | if (VECTORP (array)) | 2583 | if (VECTORP (array)) |
| 2590 | { | 2584 | { |
| 2591 | CHECK_IMPURE (array, XVECTOR (array)); | ||
| 2592 | if (idxval < 0 || idxval >= ASIZE (array)) | 2585 | if (idxval < 0 || idxval >= ASIZE (array)) |
| 2593 | args_out_of_range (array, idx); | 2586 | args_out_of_range (array, idx); |
| 2594 | ASET (array, idxval, newelt); | 2587 | ASET (array, idxval, newelt); |
| @@ -2606,14 +2599,12 @@ bool-vector. IDX starts at 0. */) | |||
| 2606 | } | 2599 | } |
| 2607 | else if (RECORDP (array)) | 2600 | else if (RECORDP (array)) |
| 2608 | { | 2601 | { |
| 2609 | CHECK_IMPURE (array, XVECTOR (array)); | ||
| 2610 | if (idxval < 0 || idxval >= PVSIZE (array)) | 2602 | if (idxval < 0 || idxval >= PVSIZE (array)) |
| 2611 | args_out_of_range (array, idx); | 2603 | args_out_of_range (array, idx); |
| 2612 | ASET (array, idxval, newelt); | 2604 | ASET (array, idxval, newelt); |
| 2613 | } | 2605 | } |
| 2614 | else /* STRINGP */ | 2606 | else /* STRINGP */ |
| 2615 | { | 2607 | { |
| 2616 | CHECK_IMPURE (array, XSTRING (array)); | ||
| 2617 | if (idxval < 0 || idxval >= SCHARS (array)) | 2608 | if (idxval < 0 || idxval >= SCHARS (array)) |
| 2618 | args_out_of_range (array, idx); | 2609 | args_out_of_range (array, idx); |
| 2619 | CHECK_CHARACTER (newelt); | 2610 | CHECK_CHARACTER (newelt); |
| @@ -4072,7 +4063,7 @@ syms_of_data (void) | |||
| 4072 | DEFSYM (Qaref, "aref"); | 4063 | DEFSYM (Qaref, "aref"); |
| 4073 | DEFSYM (Qaset, "aset"); | 4064 | DEFSYM (Qaset, "aset"); |
| 4074 | 4065 | ||
| 4075 | error_tail = pure_cons (Qerror, Qnil); | 4066 | error_tail = Fcons (Qerror, Qnil); |
| 4076 | 4067 | ||
| 4077 | /* ERROR is used as a signaler for random errors for which nothing else is | 4068 | /* ERROR is used as a signaler for random errors for which nothing else is |
| 4078 | right. */ | 4069 | right. */ |
| @@ -4080,14 +4071,14 @@ syms_of_data (void) | |||
| 4080 | Fput (Qerror, Qerror_conditions, | 4071 | Fput (Qerror, Qerror_conditions, |
| 4081 | error_tail); | 4072 | error_tail); |
| 4082 | Fput (Qerror, Qerror_message, | 4073 | Fput (Qerror, Qerror_message, |
| 4083 | build_pure_c_string ("error")); | 4074 | build_string ("error")); |
| 4084 | 4075 | ||
| 4085 | #define PUT_ERROR(sym, tail, msg) \ | 4076 | #define PUT_ERROR(sym, tail, msg) \ |
| 4086 | Fput (sym, Qerror_conditions, pure_cons (sym, tail)); \ | 4077 | Fput (sym, Qerror_conditions, Fcons (sym, tail)); \ |
| 4087 | Fput (sym, Qerror_message, build_pure_c_string (msg)) | 4078 | Fput (sym, Qerror_message, build_string (msg)) |
| 4088 | 4079 | ||
| 4089 | PUT_ERROR (Qquit, Qnil, "Quit"); | 4080 | PUT_ERROR (Qquit, Qnil, "Quit"); |
| 4090 | PUT_ERROR (Qminibuffer_quit, pure_cons (Qquit, Qnil), "Quit"); | 4081 | PUT_ERROR (Qminibuffer_quit, Fcons (Qquit, Qnil), "Quit"); |
| 4091 | 4082 | ||
| 4092 | PUT_ERROR (Quser_error, error_tail, ""); | 4083 | PUT_ERROR (Quser_error, error_tail, ""); |
| 4093 | PUT_ERROR (Qwrong_length_argument, error_tail, "Wrong length argument"); | 4084 | PUT_ERROR (Qwrong_length_argument, error_tail, "Wrong length argument"); |
| @@ -4114,14 +4105,14 @@ syms_of_data (void) | |||
| 4114 | PUT_ERROR (Qno_catch, error_tail, "No catch for tag"); | 4105 | PUT_ERROR (Qno_catch, error_tail, "No catch for tag"); |
| 4115 | PUT_ERROR (Qend_of_file, error_tail, "End of file during parsing"); | 4106 | PUT_ERROR (Qend_of_file, error_tail, "End of file during parsing"); |
| 4116 | 4107 | ||
| 4117 | arith_tail = pure_cons (Qarith_error, error_tail); | 4108 | arith_tail = Fcons (Qarith_error, error_tail); |
| 4118 | Fput (Qarith_error, Qerror_conditions, arith_tail); | 4109 | Fput (Qarith_error, Qerror_conditions, arith_tail); |
| 4119 | Fput (Qarith_error, Qerror_message, build_pure_c_string ("Arithmetic error")); | 4110 | Fput (Qarith_error, Qerror_message, build_string ("Arithmetic error")); |
| 4120 | 4111 | ||
| 4121 | PUT_ERROR (Qbeginning_of_buffer, error_tail, "Beginning of buffer"); | 4112 | PUT_ERROR (Qbeginning_of_buffer, error_tail, "Beginning of buffer"); |
| 4122 | PUT_ERROR (Qend_of_buffer, error_tail, "End of buffer"); | 4113 | PUT_ERROR (Qend_of_buffer, error_tail, "End of buffer"); |
| 4123 | PUT_ERROR (Qbuffer_read_only, error_tail, "Buffer is read-only"); | 4114 | PUT_ERROR (Qbuffer_read_only, error_tail, "Buffer is read-only"); |
| 4124 | PUT_ERROR (Qtext_read_only, pure_cons (Qbuffer_read_only, error_tail), | 4115 | PUT_ERROR (Qtext_read_only, Fcons (Qbuffer_read_only, error_tail), |
| 4125 | "Text is read-only"); | 4116 | "Text is read-only"); |
| 4126 | PUT_ERROR (Qinhibited_interaction, error_tail, | 4117 | PUT_ERROR (Qinhibited_interaction, error_tail, |
| 4127 | "User interaction while inhibited"); | 4118 | "User interaction while inhibited"); |
| @@ -4144,10 +4135,10 @@ syms_of_data (void) | |||
| 4144 | PUT_ERROR (Qunderflow_error, Fcons (Qrange_error, arith_tail), | 4135 | PUT_ERROR (Qunderflow_error, Fcons (Qrange_error, arith_tail), |
| 4145 | "Arithmetic underflow error"); | 4136 | "Arithmetic underflow error"); |
| 4146 | 4137 | ||
| 4147 | recursion_tail = pure_cons (Qrecursion_error, error_tail); | 4138 | recursion_tail = Fcons (Qrecursion_error, error_tail); |
| 4148 | Fput (Qrecursion_error, Qerror_conditions, recursion_tail); | 4139 | Fput (Qrecursion_error, Qerror_conditions, recursion_tail); |
| 4149 | Fput (Qrecursion_error, Qerror_message, build_pure_c_string | 4140 | Fput (Qrecursion_error, Qerror_message, |
| 4150 | ("Excessive recursive calling error")); | 4141 | build_string ("Excessive recursive calling error")); |
| 4151 | 4142 | ||
| 4152 | PUT_ERROR (Qexcessive_lisp_nesting, recursion_tail, | 4143 | PUT_ERROR (Qexcessive_lisp_nesting, recursion_tail, |
| 4153 | "Lisp nesting exceeds `max-lisp-eval-depth'"); | 4144 | "Lisp nesting exceeds `max-lisp-eval-depth'"); |