aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <[email protected]>2000-04-05 18:53:39 +0000
committerKen Raeburn <[email protected]>2000-04-05 18:53:39 +0000
commitc0333abccb3e0997fad7d6a62bc317a49fbf6d07 (patch)
tree985782f6347583dcb0460a8bda994fff6f26a09d /src
parent74e49b38a8438c25b5f96cbc16be8001c706a484 (diff)
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog7
-rw-r--r--src/intervals.h8
2 files changed, 10 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b42ccbb177..b957c146a8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2000-04-05 Ken Raeburn <[email protected]>
+ * 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.
+
* dispnew.c (allocate_matrices_for_frame_redisplay,
direct_output_forward_char): Use X(U)INT and make_number as needed
to convert between (unsigned) int values and lisp integers.
diff --git a/src/intervals.h b/src/intervals.h
index 5db02e7862..1a6bb341d0 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -113,12 +113,10 @@ Boston, MA 02111-1307, USA. */
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. */