summaryrefslogtreecommitdiff
path: root/libguile/pairs.h
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-09-22 17:37:01 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-09-22 17:37:01 +0000
commit6fcc7d48e4940941e70ad820d74ea3880e6840d7 (patch)
tree2bc18edc2100597504bef98c1cd39c7445706538 /libguile/pairs.h
parent5dd82006b0ff97ce05c87cf615c544a25b2c4f6d (diff)
* discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
discouraged.h. Replaced all uses with scm_is_pair. (SCM_I_CONSP): New name for SCM_CONSP. * pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr, scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar, scm_cadr, etc): New. (SCM_NULLP, SCM_NNULLP): Moved to discouraged.h. Replaced all uses with scm_is_null.
Diffstat (limited to 'libguile/pairs.h')
-rw-r--r--libguile/pairs.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/libguile/pairs.h b/libguile/pairs.h
index 854444c90..5435282e7 100644
--- a/libguile/pairs.h
+++ b/libguile/pairs.h
@@ -3,7 +3,7 @@
#ifndef SCM_PAIRS_H
#define SCM_PAIRS_H
-/* Copyright (C) 1995,1996,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,2000,2001, 2004 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -28,13 +28,12 @@
#if (SCM_DEBUG_PAIR_ACCESSES == 1)
# define SCM_VALIDATE_PAIR(cell, expr) \
- ((!SCM_CONSP (cell) ? scm_error_pair_access (cell), 0 : 0), (expr))
+ ((!scm_is_pair (cell) ? scm_error_pair_access (cell), 0 : 0), (expr))
#else
# define SCM_VALIDATE_PAIR(cell, expr) (expr)
#endif
-#define SCM_NULLP(x) (scm_is_eq ((x), SCM_EOL))
-#define SCM_NNULLP(x) (!SCM_NULLP (x))
+#define scm_is_null(x) (scm_is_eq ((x), SCM_EOL))
#define SCM_CAR(x) (SCM_VALIDATE_PAIR (x, SCM_CELL_OBJECT_0 (x)))
#define SCM_CDR(x) (SCM_VALIDATE_PAIR (x, SCM_CELL_OBJECT_1 (x)))
@@ -78,6 +77,9 @@
#if (SCM_DEBUG_PAIR_ACCESSES == 1)
SCM_API void scm_error_pair_access (SCM);
#endif
+
+SCM_API int scm_is_pair (SCM x);
+
SCM_API SCM scm_cons (SCM x, SCM y);
SCM_API SCM scm_cons2 (SCM w, SCM x, SCM y);
SCM_API SCM scm_pair_p (SCM x);
@@ -86,8 +88,6 @@ SCM_API SCM scm_cdr (SCM x);
SCM_API SCM scm_set_car_x (SCM pair, SCM value);
SCM_API SCM scm_set_cdr_x (SCM pair, SCM value);
-SCM_API int scm_is_pair (SCM val);
-
#define SCM_I_D_PAT 0x02 /* 00000010 */
#define SCM_I_A_PAT 0x03 /* 00000011 */
#define SCM_I_DD_PAT 0x0a /* 00001010 */