mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-16 16:50:21 +02:00
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 == / !=.
This commit is contained in:
parent
b2feee6bc0
commit
d223c3fcdd
15 changed files with 59 additions and 63 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2006, 2008 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2006, 2008, 2011 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 License
|
||||
|
@ -92,7 +92,7 @@ SCM_DEFINE (scm_variable_ref, "variable-ref", 1, 0, 0,
|
|||
SCM val;
|
||||
SCM_VALIDATE_VARIABLE (1, var);
|
||||
val = SCM_VARIABLE_REF (var);
|
||||
if (val == SCM_UNDEFINED)
|
||||
if (scm_is_eq (val, SCM_UNDEFINED))
|
||||
SCM_MISC_ERROR ("variable is unbound: ~S", scm_list_1 (var));
|
||||
return val;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ SCM_DEFINE (scm_variable_bound_p, "variable-bound?", 1, 0, 0,
|
|||
#define FUNC_NAME s_scm_variable_bound_p
|
||||
{
|
||||
SCM_VALIDATE_VARIABLE (1, var);
|
||||
return scm_from_bool (SCM_VARIABLE_REF (var) != SCM_UNDEFINED);
|
||||
return scm_from_bool (!scm_is_eq (SCM_VARIABLE_REF (var), SCM_UNDEFINED));
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue