diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-03-25 08:47:57 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-03-25 09:03:29 -0700 |
commit | b7a98993789d18bc675798d49038982d5cf41683 (patch) | |
tree | 664630027dfc0918c3fa61156435250063057e1d /src/eval.c | |
parent | 176ababa8cf57564cf9374c15ffdc14fa76be39f (diff) | |
download | emacs-b7a98993789d18bc675798d49038982d5cf41683.tar.gz emacs-b7a98993789d18bc675798d49038982d5cf41683.tar.bz2 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.c | 6 |
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/>. */ # define CACHEABLE /* empty */ #endif -/* Chain of condition and catch handlers currently in effect. */ - -/* struct handler *handlerlist; */ - /* Non-nil means record all fset's and provide's, to be undone if the file being autoloaded is not fully loaded. They are recorded by being consed onto the front of Vautoload_queue: @@ -248,8 +244,6 @@ init_eval_once_for_pdumper (void) specpdl = specpdl_ptr = pdlvec + 1; } -/* static struct handler handlerlist_sentinel; */ - void init_eval (void) { |