aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorPaul Eggert2019-03-25 08:47:57 -0700
committerPaul Eggert2019-03-25 09:03:29 -0700
commitb7a98993789d18bc675798d49038982d5cf41683 (patch)
tree664630027dfc0918c3fa61156435250063057e1d /src/eval.c
parent176ababa8cf57564cf9374c15ffdc14fa76be39f (diff)
downloademacs-b7a98993789d18bc675798d49038982d5cf41683.tar.gz
emacs-b7a98993789d18bc675798d49038982d5cf41683.zip
Fix some integer issues in regex-emacs
Also, remove some duplicate comments related to thread.h. * src/regex-emacs.h (struct re_registers): * src/regex-emacs.c (SIGN_EXTEND_CHAR): Remove. (TALLOC, RETALLOC): Remove. All uses replaced by usual allocators, which check for integer overflow. (extract_number): Redo without using ‘unsigned’. (CHARSET_RANGE_TABLE_EXISTS_P): Clearly return a boolean. (print_fastmap, print_partial_compiled_pattern, CHECK_INFINITE_LOOP) (regex_compile, analyze_first, bcmp_translate, mutually_exclusive_p) (re_match_2_internal): Use bool for booleans. (print_fastmap, regex_compile, execute_charset): Prefer int to unsigned where either will do. (print_double_string): Prefer ptrdiff_t to ssize_t, since the latter can in theory be narrower than the former. Use fwrite instead of repeated putchar. (emacs_re_max_failures, fail_stack_type, compile_stack_type) (re_wctype_parse, regex_compile, re_search, re_search_2) (re_match_2, re_match_2_internal, re_compile_pattern): Prefer ptrdiff_t to size_t where either will do. (union fail_stack_elt, PUSH_FAILURE_REG, POP_FAILURE_REG_OR_COUNT): Make the integer an intptr_t, not long. (GET_BUFFER_SPACE, EXTEND_BUFFER, regex_compile): Use xpalloc to simplify allocation. (regex_compile): Check for integer overflow when calculating register numbers. * src/regex-emacs.c (re_set_registers, re_match_2_internal): * src/regex-emacs.h (struct re_registers, struct re_pattern_buffer): * src/search.c (Freplace_match): Prefer ptrdiff_t to unsigned where either will do. * src/regex-emacs.h (struct re_pattern_buffer): Prefer bool_bf to unsigned where either will do.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/eval.c b/src/eval.c
index 09e8fdf4c2a..49d6460e6e4 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -40,10 +40,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
40# define CACHEABLE /* empty */ 40# define CACHEABLE /* empty */
41#endif 41#endif
42 42
43/* Chain of condition and catch handlers currently in effect. */
44
45/* struct handler *handlerlist; */
46
47/* Non-nil means record all fset's and provide's, to be undone 43/* Non-nil means record all fset's and provide's, to be undone
48 if the file being autoloaded is not fully loaded. 44 if the file being autoloaded is not fully loaded.
49 They are recorded by being consed onto the front of Vautoload_queue: 45 They are recorded by being consed onto the front of Vautoload_queue:
@@ -248,8 +244,6 @@ init_eval_once_for_pdumper (void)
248 specpdl = specpdl_ptr = pdlvec + 1; 244 specpdl = specpdl_ptr = pdlvec + 1;
249} 245}
250 246
251/* static struct handler handlerlist_sentinel; */
252
253void 247void
254init_eval (void) 248init_eval (void)
255{ 249{