object-property

Robert STRANDH (Robert.Strandh@labri.u-bordeaux.fr)
Mon, 23 Dec 1996 23:33:14 +0100 (MET)

I think I found the bug in object-property. This is the code for
scm_object_property.

SCM
scm_object_property (obj, key)
SCM obj;
SCM key;
{
SCM assoc;
assoc = scm_assq (key, SCM_CDR (scm_object_properties (obj)));
return (SCM_NIMP (assoc) ? SCM_CDR (assoc) : SCM_BOOL_F);
}

I don't think there should be be a SCM_CDR after calling
scm_object_properties.

When I modify it like this

SCM
scm_object_property (obj, key)
SCM obj;
SCM key;
{
SCM assoc;
assoc = scm_assq (key, scm_object_properties (obj));
return (SCM_NIMP (assoc) ? SCM_CDR (assoc) : SCM_BOOL_F);
}

it seems to work.

-- 
Robert Strandh

--------------------------------------------------------------------- Greenspun's Tenth Rule of Programming: any sufficiently complicated C or Fortran program contains an ad hoc informally-specified bug-ridden slow implementation of half of Common Lisp. ---------------------------------------------------------------------