diff --git a/libguile/ChangeLog b/libguile/ChangeLog index c7a7290cc..0a131f1ce 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2000-06-14 Michael Livshin + + * gc.c (scm_unprotect_object): fix a nasty typo bug (thanks to + Dirk Herrmann). + 2000-06-14 Mikael Djurfeldt * socket.c (scm_getsockopt): Changed type for `optlen' from int to diff --git a/libguile/gc.c b/libguile/gc.c index b7dcbc349..58edc6c44 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -2143,7 +2143,7 @@ scm_protect_object (SCM obj) SCM handle; /* This critical section barrier will be replaced by a mutex. */ - SCM_DEFER_INTS; + SCM_REDEFER_INTS; handle = scm_hashq_get_handle (scm_protects, obj); @@ -2152,7 +2152,7 @@ scm_protect_object (SCM obj) else SCM_SETCDR (handle, SCM_MAKINUM (SCM_INUM (SCM_CDR (handle)) + 1)); - SCM_ALLOW_INTS; + SCM_REALLOW_INTS; return obj; } @@ -2168,20 +2168,20 @@ scm_unprotect_object (SCM obj) SCM handle; /* This critical section barrier will be replaced by a mutex. */ - SCM_DEFER_INTS; + SCM_REDEFER_INTS; handle = scm_hashq_get_handle (scm_protects, obj); if (SCM_NIMP (handle)) { - int count = SCM_INUM (SCM_CAR (handle)) - 1; + 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_ALLOW_INTS; + SCM_REALLOW_INTS; return obj; }