1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

* The reference count in scm_unprotect_object is always positive.

This commit is contained in:
Dirk Herrmann 2000-06-15 08:35:42 +00:00
parent 3243bcc0c7
commit 6a19994066
2 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2000-06-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
* gc.c (scm_unprotect_object): The reference count is guaranteed
to be a positive number.
2000-06-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* eval.c: Updated comment above scm_map.

View file

@ -2173,14 +2173,14 @@ scm_unprotect_object (SCM obj)
fprintf (stderr, "scm_unprotect_object called on unprotected object\n");
abort ();
}
{
int count = SCM_INUM (SCM_CDR (handle)) - 1;
if (count <= 0)
scm_hashq_remove_x (scm_protects, obj);
else
SCM_SETCDR (handle, SCM_MAKINUM (count));
}
else
{
unsigned long int count = SCM_INUM (SCM_CDR (handle)) - 1;
if (count == 0)
scm_hashq_remove_x (scm_protects, obj);
else
SCM_SETCDR (handle, SCM_MAKINUM (count));
}
SCM_REALLOW_INTS;