Fix typo in printed string
[pspp] / src / libpspp / cast.h
index 5c64fac864a8e1eb78588dcc7558177d759ce0e1..802698da23ae2fcca48c158d464b4efd8b34eedb 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    not yet carefully examined the situation, or if you are not sure.
    Use CHAR_CAST if you are convinced that this is actually a correct cast. */
 #define CHAR_CAST(TYPE, POINTER)                                \
-        ((void) verify_true (sizeof (*(POINTER)) == 1),         \
-         (void) (sizeof (*(POINTER) + 1)),                      \
-         (void) verify_true (sizeof (*(TYPE) NULL) == 1),       \
-         (void) (sizeof (*(TYPE) NULL + 1)),                    \
-         (TYPE) (POINTER))
+  ((void) verify_expr (sizeof (*(POINTER)) == 1, 1),            \
+   (void) (sizeof (*(POINTER) + 1)),                            \
+   (void) verify_expr (sizeof (*(TYPE) NULL) == 1, 1),          \
+   (void) (sizeof (*(TYPE) NULL + 1)),                          \
+   (TYPE) (POINTER))
 #define CHAR_CAST_BUG(TYPE, POINTER) CHAR_CAST(TYPE, POINTER)
 
 /* Given POINTER, a pointer to the given MEMBER within structure
         (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 */