-#define SET_INTERVAL_PARENT(i,p) \
- ((i)->up_obj = 0, (i)->up.interval = (p))
-#define SET_INTERVAL_OBJECT(i,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)
-#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. */
-#define COPY_INTERVAL_PARENT(d,s) \
- ((d)->up = (s)->up, (d)->up_obj = (s)->up_obj)
+
+#define INTERVAL_PARENT(i) \
+ (eassert ((i) != 0 && ! (i)->up_obj), (i)->up.interval)
+
+#define GET_INTERVAL_OBJECT(d,s) (eassert ((s)->up_obj), (d) = (s)->up.obj)
+
+/* Use these functions to set Lisp_Object
+ or pointer slots of struct interval. */
+
+INLINE void
+set_interval_object (INTERVAL i, Lisp_Object obj)
+{
+ eassert (BUFFERP (obj) || STRINGP (obj));
+ i->up_obj = 1;
+ i->up.obj = obj;
+}
+
+INLINE void
+set_interval_parent (INTERVAL i, INTERVAL parent)
+{
+ i->up_obj = false;
+ i->up.interval = parent;
+}
+
+INLINE void
+set_interval_plist (INTERVAL i, Lisp_Object plist)
+{
+ i->plist = plist;
+}