* gc.c (scm_unprotect_object): fix a nasty typo bug (thanks to
authorMichael Livshin <mlivshin@bigfoot.com>
Wed, 14 Jun 2000 14:21:49 +0000 (14:21 +0000)
committerMichael Livshin <mlivshin@bigfoot.com>
Wed, 14 Jun 2000 14:21:49 +0000 (14:21 +0000)
Dirk Herrmann).

libguile/ChangeLog
libguile/gc.c

index c7a7290..0a131f1 100644 (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>
 
        * socket.c (scm_getsockopt): Changed type for `optlen' from int to
index b7dcbc3..58edc6c 100644 (file)
@@ -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;
 }