diff options
author | Andy Wingo <wingo@pobox.com> | 2012-01-10 00:41:42 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-01-10 00:41:42 +0100 |
commit | 91ee7515da0bad91330ce5c87b250d6cf12a2789 (patch) | |
tree | ce023c92c0d9bf895c1265b107b270c35ba59b94 /libguile/eq.c | |
parent | 0bdd43515eb3c62839512181cf33e5aea383e661 (diff) | |
parent | 0e947e1d14597651c5762a4209225c472bdaef45 (diff) | |
download | guile-91ee7515da0bad91330ce5c87b250d6cf12a2789.tar.gz |
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
libguile/__scm.h
libguile/array-map.c
libguile/procprop.c
libguile/tags.h
module/ice-9/deprecated.scm
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
test-suite/standalone/test-num2integral.c
test-suite/tests/regexp.test
Diffstat (limited to 'libguile/eq.c')
-rw-r--r-- | libguile/eq.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libguile/eq.c b/libguile/eq.c index 5e270a25c..5a6f574d2 100644 --- a/libguile/eq.c +++ b/libguile/eq.c @@ -302,10 +302,6 @@ scm_equal_p (SCM x, SCM y) y = SCM_CDR(y); goto tailrecurse; } - if (SCM_TYP7 (x) == scm_tc7_string && SCM_TYP7 (y) == scm_tc7_string) - return scm_string_equal_p (x, y); - if (SCM_TYP7 (x) == scm_tc7_bytevector && SCM_TYP7 (y) == scm_tc7_bytevector) - return scm_bytevector_eq_p (x, y); if (SCM_TYP7 (x) == scm_tc7_smob && SCM_TYP16 (x) == SCM_TYP16 (y)) { int i = SCM_SMOBNUM (x); @@ -316,8 +312,6 @@ scm_equal_p (SCM x, SCM y) else goto generic_equal; } - if (SCM_POINTER_P (x) && SCM_POINTER_P (y)) - return scm_from_bool (SCM_POINTER_VALUE (x) == SCM_POINTER_VALUE (y)); /* This ensures that types and scm_length are the same. */ if (SCM_CELL_TYPE (x) != SCM_CELL_TYPE (y)) @@ -352,7 +346,20 @@ scm_equal_p (SCM x, SCM y) return scm_complex_equalp (x, y); case scm_tc16_fraction: return scm_i_fraction_equalp (x, y); + default: + /* assert not reached? */ + return SCM_BOOL_F; } + case scm_tc7_pointer: + return scm_from_bool (SCM_POINTER_VALUE (x) == SCM_POINTER_VALUE (y)); + case scm_tc7_string: + return scm_string_equal_p (x, y); + case scm_tc7_bytevector: + return scm_bytevector_eq_p (x, y); + case scm_tc7_array: + return scm_array_equal_p (x, y); + case scm_tc7_bitvector: + return scm_i_bitvector_equal_p (x, y); case scm_tc7_vector: case scm_tc7_wvect: return scm_i_vector_equal_p (x, y); |