[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108021: Don't call r_alloc_inhibi
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108021: Don't call r_alloc_inhibit_buffer_relocation from search.c. |
Date: |
Tue, 29 May 2012 19:01:05 +0300 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108021
fixes bug: http://debbugs.gnu.org/11519
committer: Eli Zaretskii <address@hidden>
branch nick: emacs-24
timestamp: Tue 2012-05-29 19:01:05 +0300
message:
Don't call r_alloc_inhibit_buffer_relocation from search.c.
src/search.c (search_buffer): Remove calls to
r_alloc_inhibit_buffer_relocation, as it is now called by
maybe_unify_char, which was the cause of relocation of buffer text
in bug#11519.
modified:
src/ChangeLog
src/search.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-05-28 16:50:10 +0000
+++ b/src/ChangeLog 2012-05-29 16:01:05 +0000
@@ -1,3 +1,10 @@
+2012-05-29 Eli Zaretskii <address@hidden>
+
+ * search.c (search_buffer): Remove calls to
+ r_alloc_inhibit_buffer_relocation, as it is now called by
+ maybe_unify_char, which was the cause of relocation of buffer text
+ in bug#11519.
+
2012-05-23 Eli Zaretskii <address@hidden>
* charset.c (maybe_unify_char): Inhibit relocation of buffer text
=== modified file 'src/search.c'
--- a/src/search.c 2012-05-23 17:32:28 +0000
+++ b/src/search.c 2012-05-29 16:01:05 +0000
@@ -1159,24 +1159,12 @@
{
EMACS_INT val;
-#ifdef REL_ALLOC
- /* re_search_2 below is passed C pointers to buffer text.
- If some code called by it causes memory (re)allocation,
- buffer text could be relocated on platforms that use
- REL_ALLOC, which invalidates those C pointers. So we
- inhibit relocation of buffer text for as long as
- re_search_2 runs. */
- r_alloc_inhibit_buffer_relocation (1);
-#endif
val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2,
pos_byte - BEGV_BYTE, lim_byte - pos_byte,
(NILP (Vinhibit_changing_match_data)
? &search_regs : &search_regs_1),
/* Don't allow match past current point */
pos_byte - BEGV_BYTE);
-#ifdef REL_ALLOC
- r_alloc_inhibit_buffer_relocation (0);
-#endif
if (val == -2)
{
matcher_overflow ();
@@ -1216,19 +1204,11 @@
{
EMACS_INT val;
-#ifdef REL_ALLOC
- /* See commentary above for the reasons for inhibiting
- buffer text relocation here. */
- r_alloc_inhibit_buffer_relocation (1);
-#endif
val = re_search_2 (bufp, (char *) p1, s1, (char *) p2, s2,
pos_byte - BEGV_BYTE, lim_byte - pos_byte,
(NILP (Vinhibit_changing_match_data)
? &search_regs : &search_regs_1),
lim_byte - BEGV_BYTE);
-#ifdef REL_ALLOC
- r_alloc_inhibit_buffer_relocation (0);
-#endif
if (val == -2)
{
matcher_overflow ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108021: Don't call r_alloc_inhibit_buffer_relocation from search.c.,
Eli Zaretskii <=