This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Scm_sloppy_assq mostly fixed, still real slow


Jan Nieuwenhuizen <janneke@gnu.org> writes:

> On Thursday, 15 June 2000, Jost Boekemeier writes:
> 
> > > * Is it an error to unprotect an object too many times? I think that
> > > happens occasionally.
> 
> > No.
> 
> It is an error with the current guile snapshot.  

Doesn't make sense to me and is a bug, IMHO:

"These functions now nest properly.  That is, for every object O, there
is a counter which scm_protect_object(O) increments and
scm_unprotect_object(O) decrements, if the counter is greater than
zero.  Every object's counter is zero when it is first created.  If an
object's counter is greater than zero, the garbage collector will not
reclaim its storage."


And why does scm_unprotect return the same object?

SCM
scm_unprotect_object (SCM obj)
{
...
  return obj;
}


Umm, and the documentation in gc.c should also be updated ... :)


Jost

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]