diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-10-17 08:58:15 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-10-17 08:58:15 +0400 |
commit | f0863a54681cfe7d40a0844bd2ce812eed408002 (patch) | |
tree | 5f6db03327a067c8d3348518a33c793430d3afc7 /src/buffer.h | |
parent | ab1dc14b220747e527d507d40905a24ba5c692d9 (diff) | |
download | emacs-f0863a54681cfe7d40a0844bd2ce812eed408002.tar.gz |
Do not verify indirection counters of killed buffers (Bug#12579).
* buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
* buffer.c (compact_buffer, set_buffer_internal_1): Use it.
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/buffer.h b/src/buffer.h index d18ef30ea38..9e0e9eef0b1 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -963,6 +963,22 @@ bset_width_table (struct buffer *b, Lisp_Object val) #define BUFFER_LIVE_P(b) (!NILP (BVAR (b, name))) +/* Verify indirection counters. */ + +#define BUFFER_CHECK_INDIRECTION(b) \ + do { \ + if (BUFFER_LIVE_P (b)) \ + { \ + if (b->base_buffer) \ + { \ + eassert (b->indirections == -1); \ + eassert (b->base_buffer->indirections > 0); \ + } \ + else \ + eassert (b->indirections >= 0); \ + } \ + } while (0) + /* Chain of all buffers, including killed ones. */ extern struct buffer *all_buffers; |