#| -*-Scheme-*-
-$Id: gcfinal.scm,v 14.9 2003/11/11 01:31:28 cph Exp $
+$Id: gcfinal.scm,v 14.10 2004/12/28 06:41:10 cph Exp $
-Copyright 2000,2002,2003 Massachusetts Institute of Technology
+Copyright 2000,2002,2003,2004 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
(guarantee-gc-finalizer finalizer 'ADD-TO-GC-FINALIZER!)
(if (not ((gc-finalizer-object? finalizer) object))
(error:wrong-type-argument object
- "Finalized object"
+ "finalized object"
'ADD-TO-GC-FINALIZER!))
(without-interrupts
(lambda ()
(set-object-context! (gc-finalizer-set-object-context! finalizer)))
(if (not (object? object))
(error:wrong-type-argument object
- "Finalized object"
+ "finalized object"
'REMOVE-FROM-GC-FINALIZER!))
(without-interrupts
(lambda ()
(dynamic-wind
(lambda () unspecific)
(lambda ()
- (and (get-context p)
- (let ((context (weak-cdr p)))
- (let ((object (context->object context)))
- (without-interrupts
- (lambda ()
- (weak-set-car! p object)
- (set-gc-finalizer-items!
- finalizer
- (cons p (gc-finalizer-items finalizer)))))
- object))))
+ (get-context p)
+ (let ((context (weak-cdr p)))
+ (let ((object (context->object context)))
+ (without-interrupts
+ (lambda ()
+ (weak-set-car! p object)
+ (set-gc-finalizer-items!
+ finalizer
+ (cons p (gc-finalizer-items finalizer)))))
+ object)))
(lambda ()
(if (and (not (weak-pair/car? p)) (weak-cdr p))
(begin
#| -*-Scheme-*-
-$Id: io.scm,v 14.80 2004/12/20 04:38:37 cph Exp $
+$Id: io.scm,v 14.81 2004/12/28 06:41:33 cph Exp $
Copyright 1986,1987,1988,1990,1991,1993 Massachusetts Institute of Technology
Copyright 1994,1995,1998,1999,2000,2001 Massachusetts Institute of Technology
port)
(define (make-channel d)
- (open-channel (lambda (p) (system-pair-set-cdr! p d) #t)))
+ (open-channel (lambda (p) (system-pair-set-cdr! p d))))
(define (open-channel procedure)
(make-gc-finalized-object open-channels procedure