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

* gc.c (scm_unprotect_object): fix a nasty typo bug (thanks to

Dirk Herrmann).
This commit is contained in:
Michael Livshin 2000-06-14 14:21:49 +00:00
parent 43fbd20f25
commit 2dd6a83aed
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2000-06-14 Michael Livshin <mlivshin@bigfoot.com>
* gc.c (scm_unprotect_object): fix a nasty typo bug (thanks to
Dirk Herrmann).
2000-06-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se> 2000-06-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* socket.c (scm_getsockopt): Changed type for `optlen' from int to * socket.c (scm_getsockopt): Changed type for `optlen' from int to

View file

@ -2143,7 +2143,7 @@ scm_protect_object (SCM obj)
SCM handle; SCM handle;
/* This critical section barrier will be replaced by a mutex. */ /* This critical section barrier will be replaced by a mutex. */
SCM_DEFER_INTS; SCM_REDEFER_INTS;
handle = scm_hashq_get_handle (scm_protects, obj); handle = scm_hashq_get_handle (scm_protects, obj);
@ -2152,7 +2152,7 @@ scm_protect_object (SCM obj)
else else
SCM_SETCDR (handle, SCM_MAKINUM (SCM_INUM (SCM_CDR (handle)) + 1)); SCM_SETCDR (handle, SCM_MAKINUM (SCM_INUM (SCM_CDR (handle)) + 1));
SCM_ALLOW_INTS; SCM_REALLOW_INTS;
return obj; return obj;
} }
@ -2168,20 +2168,20 @@ scm_unprotect_object (SCM obj)
SCM handle; SCM handle;
/* This critical section barrier will be replaced by a mutex. */ /* This critical section barrier will be replaced by a mutex. */
SCM_DEFER_INTS; SCM_REDEFER_INTS;
handle = scm_hashq_get_handle (scm_protects, obj); handle = scm_hashq_get_handle (scm_protects, obj);
if (SCM_NIMP (handle)) if (SCM_NIMP (handle))
{ {
int count = SCM_INUM (SCM_CAR (handle)) - 1; int count = SCM_INUM (SCM_CDR (handle)) - 1;
if (count <= 0) if (count <= 0)
scm_hashq_remove_x (scm_protects, obj); scm_hashq_remove_x (scm_protects, obj);
else else
SCM_SETCDR (handle, SCM_MAKINUM (count)); SCM_SETCDR (handle, SCM_MAKINUM (count));
} }
SCM_ALLOW_INTS; SCM_REALLOW_INTS;
return obj; return obj;
} }