diff options
| author | Eli Zaretskii | 2012-05-23 20:32:28 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2012-05-23 20:32:28 +0300 |
| commit | 52c55cc7d2bec9795533f58e15c61f7a7b51d1b0 (patch) | |
| tree | 91855df41e7cbffb713b6b8c4ee570082e0b8d0d /src/buffer.c | |
| parent | 1b7e0ab8c77f6a6fdb9758adc7297ac907fee3c5 (diff) | |
| download | emacs-52c55cc7d2bec9795533f58e15c61f7a7b51d1b0.tar.gz emacs-52c55cc7d2bec9795533f58e15c61f7a7b51d1b0.zip | |
Fix bug #11519 with relocation of buffer text during regex search.
src/lisp.h [REL_ALLOC]: Add prototypes for external functions
defined on ralloc.c.
src/buffer.c [REL_ALLOC]: Remove prototypes of
r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
they are now on lisp.h.
src/ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
src/search.c (search_buffer): Use it to inhibit relocation of buffer
text while re_search_2 is doing its job, because re_search_2 is
passed C pointers to buffer text.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/buffer.c b/src/buffer.c index 1fea19b0d65..ac14ec9c37c 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2014,10 +2014,6 @@ advance_to_char_boundary (EMACS_INT byte_pos) | |||
| 2014 | return byte_pos; | 2014 | return byte_pos; |
| 2015 | } | 2015 | } |
| 2016 | 2016 | ||
| 2017 | #ifdef REL_ALLOC | ||
| 2018 | extern void r_alloc_reset_variable (POINTER_TYPE *, POINTER_TYPE *); | ||
| 2019 | #endif /* REL_ALLOC */ | ||
| 2020 | |||
| 2021 | DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, | 2017 | DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, |
| 2022 | 1, 1, 0, | 2018 | 1, 1, 0, |
| 2023 | doc: /* Swap the text between current buffer and BUFFER. */) | 2019 | doc: /* Swap the text between current buffer and BUFFER. */) |
| @@ -4779,13 +4775,6 @@ mmap_realloc (POINTER_TYPE **var, size_t nbytes) | |||
| 4779 | Buffer-text Allocation | 4775 | Buffer-text Allocation |
| 4780 | ***********************************************************************/ | 4776 | ***********************************************************************/ |
| 4781 | 4777 | ||
| 4782 | #ifdef REL_ALLOC | ||
| 4783 | extern POINTER_TYPE *r_alloc (POINTER_TYPE **, size_t); | ||
| 4784 | extern POINTER_TYPE *r_re_alloc (POINTER_TYPE **, size_t); | ||
| 4785 | extern void r_alloc_free (POINTER_TYPE **ptr); | ||
| 4786 | #endif /* REL_ALLOC */ | ||
| 4787 | |||
| 4788 | |||
| 4789 | /* Allocate NBYTES bytes for buffer B's text buffer. */ | 4778 | /* Allocate NBYTES bytes for buffer B's text buffer. */ |
| 4790 | 4779 | ||
| 4791 | static void | 4780 | static void |