Mercurial > emacs
diff src/buffer.c @ 100673:01f68a925d12
* ralloc.c (r_alloc_reset_variable): New function.
* buffer.c (Fbuffer_swap_text) [REL_ALLOC]: Reset ralloc's internal
record of what points where.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Wed, 24 Dec 2008 11:20:32 +0000 |
parents | 5395c014feb8 |
children | 5616d3b5b959 |
line wrap: on
line diff
--- a/src/buffer.c Wed Dec 24 00:45:51 2008 +0000 +++ b/src/buffer.c Wed Dec 24 11:20:32 2008 +0000 @@ -2182,6 +2182,10 @@ return byte_pos; } +#ifdef REL_ALLOC +extern void r_alloc_reset_variable P_ ((PTR *, PTR *)); +#endif /* REL_ALLOC */ + DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, 1, 1, 0, doc: /* Swap the text between current buffer and BUFFER. */) @@ -2223,6 +2227,13 @@ swapfield (own_text, struct buffer_text); eassert (current_buffer->text == ¤t_buffer->own_text); eassert (other_buffer->text == &other_buffer->own_text); +#ifdef REL_ALLOC + r_alloc_reset_variable ((PTR *) ¤t_buffer->own_text.beg, + (PTR *) &other_buffer->own_text.beg); + r_alloc_reset_variable ((PTR *) &other_buffer->own_text.beg, + (PTR *) ¤t_buffer->own_text.beg); +#endif /* REL_ALLOC */ + swapfield (pt, EMACS_INT); swapfield (pt_byte, EMACS_INT); swapfield (begv, EMACS_INT);