diff options
| author | Ken Raeburn | 2000-03-29 22:14:34 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2000-03-29 22:14:34 +0000 |
| commit | e0b8c689e2b1d80da6ed235ae400ad10d117b706 (patch) | |
| tree | f54bb195d821f61b0f7c3fbf4eae79b72978fdbe /src/intervals.c | |
| parent | 141384bdd2a332b79b36d118cd13becaf0b326b9 (diff) | |
| download | emacs-e0b8c689e2b1d80da6ed235ae400ad10d117b706.tar.gz emacs-e0b8c689e2b1d80da6ed235ae400ad10d117b706.zip | |
Stop assuming interval pointers and lisp objects can be distinguished by
inspection. Beginnings of support for expensive internal consistency checks.
* config.in (ENABLE_CHECKING): Undef.
* lisp.h (struct interval): Replace "parent" field with a union of interval
pointer and Lisp_Object; add new bitfield to use as discriminant. Change other
flag fields to bitfields.
(CHECK): New macro for consistency checking. If ENABLE_CHECKING is defined and
the supplied test fails, print a message and abort.
(eassert): New macro. Use CHECK to provide an assert-like facility.
* intervals.h (NULL_INTERVAL_P): Now applies only to real interval pointers;
abort if the value looks like a lisp object.
(NULL_INTERVAL_P, NULL_PARENT, HAS_PARENT, HAS_OBJECT, SET_PARENT, SET_OBJECT,
INTERVAL_PARENT, GET_INTERVAL_OBJECT, COPY_PARENT): Modify for new interval
parent definition.
* alloc.c (mark_interval_tree, MARK_INTERVAL_TREE, UNMARK_BALANCE_INTERVALS):
Update references that need an addressable lisp object in the interval
structure.
(die): New function.
(suppress_checking): New variable.
* intervals.c (interval_start_pos): Just return 0 if there's no parent object.
Diffstat (limited to 'src/intervals.c')
| -rw-r--r-- | src/intervals.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/intervals.c b/src/intervals.c index 2a03abbb762..f925d222db2 100644 --- a/src/intervals.c +++ b/src/intervals.c | |||
| @@ -570,6 +570,8 @@ interval_start_pos (source) | |||
| 570 | if (NULL_INTERVAL_P (source)) | 570 | if (NULL_INTERVAL_P (source)) |
| 571 | return 0; | 571 | return 0; |
| 572 | 572 | ||
| 573 | if (! INTERVAL_HAS_OBJECT (source)) | ||
| 574 | return 0; | ||
| 573 | GET_INTERVAL_OBJECT (parent, source); | 575 | GET_INTERVAL_OBJECT (parent, source); |
| 574 | if (BUFFERP (parent)) | 576 | if (BUFFERP (parent)) |
| 575 | return BUF_BEG (XBUFFER (parent)); | 577 | return BUF_BEG (XBUFFER (parent)); |