Mercurial > emacs
changeset 28509:022a7fd54bfe
* intervals.h (SET_INTERVAL_PARENT): Use INT_LISPLIKE to test for a pointer
that looks like a lisp object.
(SET_INTERVAL_OBJECT): Don't explicitly compare the object with zero, instead
see whether it's an integer object, since they can't have intervals.
(GET_INTERVAL_OBJECT): Simply assign to the destination.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Wed, 05 Apr 2000 18:53:39 +0000 |
parents | a68042252425 |
children | 6fb7a3864791 |
files | src/ChangeLog src/intervals.h |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/intervals.h Wed Apr 05 18:47:29 2000 +0000 +++ b/src/intervals.h Wed Apr 05 18:53:39 2000 +0000 @@ -113,12 +113,10 @@ The choice of macros is dependent on the type needed. Don't add casts to get around this, it will break some development work in progress. */ -#define SET_INTERVAL_PARENT(i,p) (eassert (!BUFFERP ((Lisp_Object)(p)) && !STRINGP ((Lisp_Object)(p))),(i)->up_obj = 0, (i)->up.interval = (p)) -#define SET_INTERVAL_OBJECT(i,o) (eassert ((o) != 0), eassert (BUFFERP (o) || STRINGP (o)),(i)->up_obj = 1, (i)->up.obj = (o)) +#define SET_INTERVAL_PARENT(i,p) (eassert (!INT_LISPLIKE (p)),(i)->up_obj = 0, (i)->up.interval = (p)) +#define SET_INTERVAL_OBJECT(i,o) (eassert (!INTEGERP (o)), eassert (BUFFERP (o) || STRINGP (o)),(i)->up_obj = 1, (i)->up.obj = (o)) #define INTERVAL_PARENT(i) (eassert((i) != 0 && (i)->up_obj == 0),(i)->up.interval) -/* Because XSETFASTINT has to be used, this can't simply be - value-returning. */ -#define GET_INTERVAL_OBJECT(d,s) (eassert((s)->up_obj == 1),XSETFASTINT ((d), (s)->up.obj)) +#define GET_INTERVAL_OBJECT(d,s) (eassert((s)->up_obj == 1), (d) = (s)->up.obj) /* Make the parent of D be whatever the parent of S is, regardless of type. This is used when balancing an interval tree. */