mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
check for pairs with scm_is_pair, not scm_nimp
* libguile/array-map.c (scm_ra_matchp, scm_ramapc): * libguile/dynwind.c (scm_swap_bindings): * libguile/hooks.c (hook_print, scm_c_run_hook, scm_c_run_hookn): * libguile/objprop.c (scm_object_property, scm_set_object_property_x): Use !scm_is_pair as the termination condition, not scm_imp.
This commit is contained in:
parent
8c0e89ac90
commit
62fdadb0a5
5 changed files with 13 additions and 13 deletions
|
@ -64,7 +64,7 @@ SCM_DEFINE (scm_object_property, "object-property", 2, 0, 0,
|
|||
{
|
||||
SCM assoc;
|
||||
assoc = scm_assq (key, scm_object_properties (obj));
|
||||
return (SCM_NIMP (assoc) ? SCM_CDR (assoc) : SCM_BOOL_F);
|
||||
return (scm_is_pair (assoc) ? SCM_CDR (assoc) : SCM_BOOL_F);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
@ -80,7 +80,7 @@ SCM_DEFINE (scm_set_object_property_x, "set-object-property!", 3, 0, 0,
|
|||
scm_i_pthread_mutex_lock (&scm_i_misc_mutex);
|
||||
alist = scm_weak_table_refq (object_whash, obj, SCM_EOL);
|
||||
assoc = scm_assq (key, alist);
|
||||
if (SCM_NIMP (assoc))
|
||||
if (scm_is_pair (assoc))
|
||||
SCM_SETCDR (assoc, value);
|
||||
else
|
||||
scm_weak_table_putq_x (object_whash, obj, scm_acons (key, value, alist));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue