[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10668: FFI: ‘set-pointer-finalizer!’ overrides the previous finalize
bug#10668: FFI: ‘set-pointer-finalizer!’ overrides the previous finalizer
Fri, 06 Jul 2012 20:26:20 +0200
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
On Mon 30 Jan 2012 23:31, address@hidden (Ludovic Courtès) writes:
> The ‘set-pointer-finalizer!’ procedure is harmful because it erases any
> previously set finalizer.
> Said finalizer could come from a guardian:
> (define ptr (make-pointer 123))
> (define g (make-guardian))
> (g ptr)
> (set-pointer-finalizer! ptr (dynamic-func "scm_is_pair" (dynamic-link)))
> (set! ptr #f)
> (g) ;; Should return PTR.
> => #f
This has worked since 75ba64d6797f5857cc9885eb753126119a8c8b68.
|[Prev in Thread]
||[Next in Thread]|
- bug#10668: FFI: ‘set-pointer-finalizer!’ overrides the previous finalizer,
Andy Wingo <=