if (SCM_UNBNDP (fill))
fill = SCM_UNSPECIFIED;
- wv = PTR2SCM (scm_gc_malloc_pointerless ((len + 1) * sizeof (SCM),
+ wv = SCM_PACK_POINTER (scm_gc_malloc_pointerless ((len + 1) * sizeof (SCM),
"weak vector"));
SCM_SET_CELL_WORD_0 (wv, (len << 8) | scm_tc7_wvect);
- if (SCM_NIMP (fill))
+ if (SCM_HEAP_OBJECT_P (fill))
{
memset (SCM_I_VECTOR_WELTS (wv), 0, len * sizeof (SCM));
for (j = 0; j < len; j++)
ret = GC_call_with_alloc_lock (weak_vector_ref, &d);
if (ret)
- return PTR2SCM (ret);
+ return SCM_PACK_POINTER (ret);
else
return SCM_BOOL_F;
}
elts = SCM_I_VECTOR_WELTS (wv);
- if (prev && SCM_NIMP (PTR2SCM (prev)))
+ if (prev && SCM_HEAP_OBJECT_P (SCM_PACK_POINTER (prev)))
GC_unregister_disappearing_link ((GC_PTR) &elts[k]);
elts[k] = x;
- if (SCM_NIMP (x))
+ if (SCM_HEAP_OBJECT_P (x))
SCM_I_REGISTER_DISAPPEARING_LINK ((GC_PTR) &elts[k],
(GC_PTR) SCM2PTR (x));
}