Optimize 'string-hash'.
[bpt/guile.git] / libguile / pairs.h
index a5b6fcd..6edfc9c 100644 (file)
 
 /*
  * Use scm_is_null_and_not_nil if it's important (for correctness)
- * that %nil must NOT be considered null.
+ * that #nil must NOT be considered null.
  */
 #define scm_is_null_and_not_nil(x)     (scm_is_eq ((x), SCM_EOL))
 
 /*
- * Use scm_is_null_assume_not_nil if %nil will never be tested,
+ * Use scm_is_null_assume_not_nil if 
+#nil will never be tested,
  * for increased efficiency.
  */
 #define scm_is_null_assume_not_nil(x)  (scm_is_eq ((x), SCM_EOL))
   (SCM_MATCHES_BITS_IN_COMMON ((x), SCM_ELISP_NIL, SCM_EOL))
 
 
-/* Older spellings for these nil predicates. */
+\f
+
+/* Older spellings for these null, nil, and pair predicates. */
 #define SCM_NILP(x) (scm_is_eq ((x), SCM_ELISP_NIL))
 #define SCM_NULL_OR_NIL_P(x) (scm_is_null_or_nil (x))
+#define SCM_NULLP(x) (scm_is_null (x))
+#define SCM_NNULLP(x) (!scm_is_null (x))
+#define SCM_CONSP(x)            (scm_is_pair (x))
+#define SCM_NCONSP(x)           (!SCM_CONSP (x))
 
 
-/* %nil is null. */
+\f
+
+/* #nil is null. */
 #define scm_is_null(x)         (scm_is_null_or_nil(x))
 
 #define SCM_CAR(x)             (SCM_VALIDATE_PAIR (x, SCM_CELL_OBJECT_0 (x)))