diff options
author | Andy Wingo <wingo@pobox.com> | 2011-05-13 12:42:01 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-05-13 13:49:32 +0200 |
commit | d223c3fcdde81280ea8fb9a4b05897786014bbce (patch) | |
tree | c115c349078a1cbdf225cd9cd1e3c0bba14422a7 /libguile/goops.c | |
parent | b2feee6bc0d440a20c2c8cbb7b3d03c957c2c417 (diff) | |
download | guile-d223c3fcdde81280ea8fb9a4b05897786014bbce.tar.gz |
scm_is_eq for SCM vals, not == or !=
* libguile/bytevectors.c (scm_make_bytevector, STRING_TO_UTF)
(UTF_TO_STRING):
* libguile/continuations.c (scm_i_check_continuation):
* libguile/expand.h (SCM_EXPANDED_P):
* libguile/fluids.c (scm_i_make_with_fluids):
* libguile/generalized-vectors.c (scm_make_generalized_vector):
* libguile/goops.c (SCM_GOOPS_UNBOUNDP, slot_definition_using_name):
(scm_c_extend_primitive_generic, more_specificp, scm_make)
* libguile/i18n.c (SCM_VALIDATE_OPTIONAL_LOCALE_COPY):
(scm_locale_string_to_integer)
* libguile/modules.c (resolve_duplicate_binding):
(scm_module_reverse_lookup)
* libguile/posix.c (scm_to_resource):
* libguile/r6rs-ports.c (scm_put_bytevector):
* libguile/socket.c (scm_connect, scm_bind, scm_sendto
* libguile/stacks.c (find_prompt):
* libguile/variable.c (scm_variable_ref, scm_variable_bound_p):
* libguile/vm-engine.h (ASSERT_BOUND_VARIABLE, ASSERT_BOUND)
* libguile/vm-i-system.c (VARIABLE_BOUNDP, local_bound)
(long_local_bound, fluid_ref): Use scm_is_eq to compare, not == / !=.
Diffstat (limited to 'libguile/goops.c')
-rw-r--r-- | libguile/goops.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libguile/goops.c b/libguile/goops.c index c20001e50..1fca49150 100644 --- a/libguile/goops.c +++ b/libguile/goops.c @@ -124,7 +124,7 @@ SCM_VARIABLE (scm_var_make_extended_generic, "make-extended-generic"); #define NXT_MTHD_ARGS(m) (SCM_VELTS (m)[2]) #define SCM_GOOPS_UNBOUND SCM_UNBOUND -#define SCM_GOOPS_UNBOUNDP(x) ((x) == SCM_GOOPS_UNBOUND) +#define SCM_GOOPS_UNBOUNDP(x) (scm_is_eq (x, SCM_GOOPS_UNBOUND)) static int goops_loaded_p = 0; static scm_t_rstate *goops_rstate; @@ -1231,7 +1231,7 @@ slot_definition_using_name (SCM class, SCM slot_name) { register SCM slots = SCM_SLOT (class, scm_si_getters_n_setters); for (; !scm_is_null (slots); slots = SCM_CDR (slots)) - if (SCM_CAAR (slots) == slot_name) + if (scm_is_eq (SCM_CAAR (slots), slot_name)) return SCM_CAR (slots); return SCM_BOOL_F; } @@ -1819,7 +1819,7 @@ scm_c_extend_primitive_generic (SCM extended, SCM extension) * extensions in the extensions list. O(N^2) algorithm, but * extensions of primitive generics are rare. */ - while (*loc && extension != (*loc)->extended) + while (*loc && !scm_is_eq (extension, (*loc)->extended)) loc = &(*loc)->next; e->next = *loc; e->extended = extended; @@ -1887,13 +1887,13 @@ more_specificp (SCM m1, SCM m2, SCM const *targs) for (i=0, s1=SPEC_OF(m1), s2=SPEC_OF(m2); ; i++, s1=SCM_CDR(s1), s2=SCM_CDR(s2)) { if (scm_is_null(s1)) return 1; if (scm_is_null(s2)) return 0; - if (SCM_CAR(s1) != SCM_CAR(s2)) { + if (!scm_is_eq (SCM_CAR(s1), SCM_CAR(s2))) { register SCM l, cs1 = SCM_CAR(s1), cs2 = SCM_CAR(s2); for (l = SCM_SLOT (targs[i], scm_si_cpl); ; l = SCM_CDR(l)) { - if (cs1 == SCM_CAR(l)) + if (scm_is_eq (cs1, SCM_CAR (l))) return 1; - if (cs2 == SCM_CAR(l)) + if (scm_is_eq (cs2, SCM_CAR (l))) return 0; } return 0;/* should not occur! */ @@ -2110,7 +2110,8 @@ SCM_DEFINE (scm_make, "make", 0, 0, 1, class = SCM_CAR(args); args = SCM_CDR(args); - if (class == scm_class_generic || class == scm_class_accessor) + if (scm_is_eq (class, scm_class_generic) + || scm_is_eq (class, scm_class_accessor)) { z = scm_make_struct (class, SCM_INUM0, scm_list_4 (SCM_BOOL_F, @@ -2122,7 +2123,7 @@ SCM_DEFINE (scm_make, "make", 0, 0, 1, args, SCM_BOOL_F)); clear_method_cache (z); - if (class == scm_class_accessor) + if (scm_is_eq (class, scm_class_accessor)) { SCM setter = scm_get_keyword (k_setter, args, SCM_BOOL_F); if (scm_is_true (setter)) @@ -2133,8 +2134,8 @@ SCM_DEFINE (scm_make, "make", 0, 0, 1, { z = scm_sys_allocate_instance (class, args); - if (class == scm_class_method - || class == scm_class_accessor_method) + if (scm_is_eq (class, scm_class_method) + || scm_is_eq (class, scm_class_accessor_method)) { SCM_SET_SLOT (z, scm_si_generic_function, scm_i_get_keyword (k_gf, |