/* Header file for the buffer manipulation primitives.
-Copyright (C) 1985-1986, 1993-1995, 1997-2012
- Free Software Foundation, Inc.
+Copyright (C) 1985-1986, 1993-1995, 1997-2013 Free Software Foundation,
+Inc.
This file is part of GNU Emacs.
#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;