diff options
author | Jim Blandy <jimb@red-bean.com> | 1997-09-02 23:17:15 +0000 |
---|---|---|
committer | Jim Blandy <jimb@red-bean.com> | 1997-09-02 23:17:15 +0000 |
commit | e69ebe6af648e2b6c857a213d2c647ae43f2e580 (patch) | |
tree | 33dc31961b58153bfc9d93d87d9415e2f50ded55 | |
parent | 1ff4df7a834031d521638bca8f7a14d913770bd3 (diff) | |
download | guile-e69ebe6af648e2b6c857a213d2c647ae43f2e580.tar.gz |
* gh_predicates.c (gh_boolean_p, gh_symbol_p, gh_char_p,
gh_vector_p, gh_pair_p, gh_number_p, gh_string_p, gh_procedure_p,
gh_list_p, gh_inexact_p, gh_exact_p, gh_eq_p, gh_eqv_p,
gh_equal_p): Use SCM_NFALSEP, instead of testing against
SCM_BOOL_T. Any non-false value is true.
-rw-r--r-- | libguile/gh_predicates.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/libguile/gh_predicates.c b/libguile/gh_predicates.c index 5edf2bd2d..cb41ebaeb 100644 --- a/libguile/gh_predicates.c +++ b/libguile/gh_predicates.c @@ -50,72 +50,72 @@ int gh_boolean_p (SCM val) { - return (scm_boolean_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_boolean_p (val))); } int gh_symbol_p (SCM val) { - return (scm_symbol_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_symbol_p (val))); } int gh_char_p (SCM val) { - return (scm_char_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_char_p (val))); } int gh_vector_p (SCM val) { - return (scm_vector_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_vector_p (val))); } int gh_pair_p (SCM val) { - return (scm_pair_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_pair_p (val))); } int gh_number_p (SCM val) { - return (scm_number_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_number_p (val))); } int gh_string_p (SCM val) { - return (scm_string_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_string_p (val))); } int gh_procedure_p (SCM val) { - return (scm_procedure_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_procedure_p (val))); } int gh_list_p (SCM val) { - return (scm_list_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_list_p (val))); } int gh_inexact_p (SCM val) { - return (scm_inexact_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_inexact_p (val))); } int gh_exact_p (SCM val) { - return (scm_exact_p (val) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_exact_p (val))); } /* the three types of equality */ int gh_eq_p (SCM x, SCM y) { - return (scm_eq_p (x, y) == SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_eq_p (x, y))); } int gh_eqv_p (SCM x, SCM y) { - return (scm_eqv_p (x, y) != SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_eqv_p (x, y))); } int gh_equal_p (SCM x, SCM y) { - return (scm_equal_p (x, y) != SCM_BOOL_T) ? 1 : 0; + return (SCM_NFALSEP (scm_equal_p (x, y))); } |