summaryrefslogtreecommitdiff
path: root/libguile/weak-set.c
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-10-24 18:13:51 +0200
committerAndy Wingo <wingo@pobox.com>2011-10-24 18:55:43 +0200
commit8c5bb72920a41d165726a1b5a610d823971f1ca8 (patch)
treeed9e8b3b2ff7d617557a6c5796f088b509e910ec /libguile/weak-set.c
parentfdecb44f3252e47ee98d95f3fe473ff898ddf27e (diff)
downloadguile-8c5bb72920a41d165726a1b5a610d823971f1ca8.tar.gz
add SCM_HEAP_OBJECT_P
* libguile/tags.h (SCM_HEAP_OBJECT_P): New macro, an alias for SCM_NIMP. * libguile/arrays.c: * libguile/debug.c: * libguile/foreign.c: * libguile/gdbint.c: * libguile/guardians.c: * libguile/list.c: * libguile/modules.c: * libguile/options.c: * libguile/smob.c: * libguile/validate.h: * libguile/weak-set.c: * libguile/weak-table.c: * libguile/weak-vector.c: Use it instead of SCM_NIMP or !SCM_IMP.
Diffstat (limited to 'libguile/weak-set.c')
-rw-r--r--libguile/weak-set.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libguile/weak-set.c b/libguile/weak-set.c
index 4a1c835cf..6e2e8ab86 100644
--- a/libguile/weak-set.c
+++ b/libguile/weak-set.c
@@ -171,7 +171,7 @@ move_weak_entry (scm_t_weak_entry *from, scm_t_weak_entry *to)
to->hash = copy.hash;
to->key = copy.key;
- if (copy.key && SCM_NIMP (SCM_PACK (copy.key)))
+ if (copy.key && SCM_HEAP_OBJECT_P (SCM_PACK (copy.key)))
{
GC_unregister_disappearing_link ((GC_PTR) &from->key);
SCM_I_REGISTER_DISAPPEARING_LINK ((GC_PTR) &to->key,
@@ -358,7 +358,7 @@ resize_set (scm_t_weak_set *set)
new_entries[new_k].hash = copy.hash;
new_entries[new_k].key = copy.key;
- if (SCM_NIMP (SCM_PACK (copy.key)))
+ if (SCM_HEAP_OBJECT_P (SCM_PACK (copy.key)))
SCM_I_REGISTER_DISAPPEARING_LINK ((GC_PTR) &new_entries[new_k].key,
(GC_PTR) new_entries[new_k].key);
}
@@ -519,7 +519,7 @@ weak_set_add_x (scm_t_weak_set *set, unsigned long hash,
entries[k].hash = hash;
entries[k].key = SCM_UNPACK (obj);
- if (SCM_NIMP (obj))
+ if (SCM_HEAP_OBJECT_P (obj))
SCM_I_REGISTER_DISAPPEARING_LINK ((GC_PTR) &entries[k].key,
(GC_PTR) SCM2PTR (obj));
@@ -571,7 +571,7 @@ weak_set_remove_x (scm_t_weak_set *set, unsigned long hash,
entries[k].hash = 0;
entries[k].key = 0;
- if (SCM_NIMP (SCM_PACK (copy.key)))
+ if (SCM_HEAP_OBJECT_P (SCM_PACK (copy.key)))
GC_unregister_disappearing_link ((GC_PTR) &entries[k].key);
if (--set->n_items < set->lower)