diff options
author | Andy Wingo <wingo@pobox.com> | 2009-05-21 21:39:37 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2009-05-21 21:39:37 +0200 |
commit | 2032f3d1db09aa63de4ec060081a5bf9053f0d3c (patch) | |
tree | 0467f83f613bf7ee85bb06ebcea72a1c3da2a960 | |
parent | 0f423f20aae6228431d3695e60ade937858110b8 (diff) | |
download | guile-2032f3d1db09aa63de4ec060081a5bf9053f0d3c.tar.gz |
fix multiple values returning from srfi-18's `with-exception-handler'
* module/srfi/srfi-18.scm (with-exception-handler): Hah! Fixed a
scurrilous bug in which we assumed that the thunk returned one or more
values. Hah.
-rw-r--r-- | module/srfi/srfi-18.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/srfi/srfi-18.scm b/module/srfi/srfi-18.scm index 75f1088ab..dd92079be 100644 --- a/module/srfi/srfi-18.scm +++ b/module/srfi/srfi-18.scm @@ -151,8 +151,10 @@ (hashq-set! thread-exception-handlers ct hl) (handler obj)) (lambda () - (let ((r (thunk))) - (hashq-set! thread-exception-handlers ct hl) r)))))) + (call-with-values thunk + (lambda res + (hashq-set! thread-exception-handlers ct hl) + (apply values res)))))))) (define (current-exception-handler) (car (current-handler-stack))) |