diff options
author | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2000-03-29 16:22:57 +0000 |
---|---|---|
committer | Dirk Herrmann <dirk@dirk-herrmanns-seiten.de> | 2000-03-29 16:22:57 +0000 |
commit | fbd485ba49663beaf82cf4564d4e9b5d900c4c26 (patch) | |
tree | 17771ea08d67edec3bbfaf15e5fd51277bfbdb67 /libguile/eq.c | |
parent | 91163914cfda5c3e911365b3142d981f01eb0f9a (diff) | |
download | guile-fbd485ba49663beaf82cf4564d4e9b5d900c4c26.tar.gz |
Don't use C operators == and != to compare SCM values.
Diffstat (limited to 'libguile/eq.c')
-rw-r--r-- | libguile/eq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libguile/eq.c b/libguile/eq.c index 73e5f1fa8..0d054e931 100644 --- a/libguile/eq.c +++ b/libguile/eq.c @@ -65,7 +65,7 @@ SCM_DEFINE1 (scm_eq_p, "eq?", scm_tc7_rpsubr, "those detectable by `eqv?'.\n") #define FUNC_NAME s_scm_eq_p { - return SCM_BOOL(x==y); + return SCM_BOOL (SCM_EQ_P (x, y)); } #undef FUNC_NAME @@ -79,14 +79,14 @@ SCM_DEFINE1 (scm_eqv_p, "eqv?", scm_tc7_rpsubr, "immediate integers, characters, and inexact numbers.\n") #define FUNC_NAME s_scm_eqv_p { - if (x == y) + if (SCM_EQ_P (x, y)) return SCM_BOOL_T; if (SCM_IMP (x)) return SCM_BOOL_F; if (SCM_IMP (y)) return SCM_BOOL_F; /* this ensures that types and scm_length are the same. */ - if (SCM_CAR (x) != SCM_CAR (y)) + if (SCM_CELL_TYPE (x) != SCM_CELL_TYPE (y)) { /* treat mixes of real and complex types specially */ if (SCM_SLOPPY_INEXACTP (x)) @@ -130,7 +130,7 @@ SCM_DEFINE1 (scm_equal_p, "equal?", scm_tc7_rpsubr, SCM_CHECK_STACK; tailrecurse: SCM_TICK; - if (x == y) + if (SCM_EQ_P (x, y)) return SCM_BOOL_T; if (SCM_IMP (x)) return SCM_BOOL_F; @@ -147,7 +147,7 @@ SCM_DEFINE1 (scm_equal_p, "equal?", scm_tc7_rpsubr, if (SCM_TYP7S (x) == scm_tc7_string && SCM_TYP7S (y) == scm_tc7_string) return scm_string_equal_p (x, y); /* This ensures that types and scm_length are the same. */ - if (SCM_CAR (x) != SCM_CAR (y)) + if (SCM_CELL_TYPE (x) != SCM_CELL_TYPE (y)) { /* treat mixes of real and complex types specially */ if (SCM_SLOPPY_INEXACTP (x)) |