ffi/unsafe/alloc: releaser should be able to return a value

This commit is contained in:
Matthew Flatt 2012-02-16 20:36:40 -07:00 committed by Matthew Flatt
parent f461d9f67d
commit b93eaa19f4

View File

@ -51,10 +51,11 @@
(dynamic-wind
start-atomic
(lambda ()
(begin0
(apply proc args)
(let ([v (get-arg args)])
(let ([ds (hash-ref allocated v null)])
(hash-set! allocated v (cons d ds)))))
(hash-set! allocated v (cons d ds))))))
end-atomic))
proc))