cast: New macro NULL_SENTINEL.
[pspp] / src / libpspp / cast.h
index 5c64fac864a8e1eb78588dcc7558177d759ce0e1..00e42d6603cc68963f498c6d5ce0ab780c1b19f6 100644 (file)
         (CHECK_POINTER_COMPATIBILITY (&((STRUCT *) 0)->MEMBER, POINTER), \
          (STRUCT *) ((char *) (POINTER) - offsetof (STRUCT, MEMBER)))
 
+/* A null pointer constant suitable for use in a varargs parameter list.
+
+   This is useful because a literal 0 may not have the same width as a null
+   pointer.  NULL by itself is also insufficient because in C it may expand to
+   simply 0. */
+#define NULL_SENTINEL ((void *) NULL)
+
 #endif /* libpspp/cast.h */