summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-05-23 20:32:28 +0300
committerEli Zaretskii <eliz@gnu.org>2012-05-23 20:32:28 +0300
commit52c55cc7d2bec9795533f58e15c61f7a7b51d1b0 (patch)
tree91855df41e7cbffb713b6b8c4ee570082e0b8d0d /src/lisp.h
parent1b7e0ab8c77f6a6fdb9758adc7297ac907fee3c5 (diff)
downloademacs-52c55cc7d2bec9795533f58e15c61f7a7b51d1b0.tar.gz
emacs-52c55cc7d2bec9795533f58e15c61f7a7b51d1b0.tar.bz2
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/lisp.h')
-rw-r--r--src/lisp.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h
index bd19da55b2a..aee5b0b1ec2 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3565,6 +3565,15 @@ void syms_of_dbusbind (void);
/* Defined in msdos.c, w32.c */
extern char *emacs_root_dir (void);
#endif /* DOS_NT */
+
+#ifdef REL_ALLOC
+/* Defined in ralloc.c */
+extern void r_alloc_reset_variable (POINTER_TYPE **, POINTER_TYPE **);
+extern POINTER_TYPE *r_alloc (POINTER_TYPE **, size_t);
+extern POINTER_TYPE *r_re_alloc (POINTER_TYPE **, size_t);
+extern void r_alloc_free (POINTER_TYPE **ptr);
+extern void r_alloc_inhibit_buffer_relocation (int);
+#endif /* REL_ALLOC */
/* Nonzero means Emacs has already been initialized.
Used during startup to detect startup of dumped Emacs. */