# HG changeset patch # User Ken Raeburn # Date 954960819 0 # Node ID 022a7fd54bfea338fc157e814ba6419276bbeea4 # Parent a6804225242561a5ea53ca2b6407bac7c1f4bdb5 * 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. diff -r a68042252425 -r 022a7fd54bfe src/ChangeLog Binary file src/ChangeLog has changed diff -r a68042252425 -r 022a7fd54bfe src/intervals.h --- 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. */