fix multiple values returning from srfi-18's `with-exception-handler'
[bpt/guile.git] / module / srfi / srfi-18.scm
index 75f1088..dd92079 100644 (file)
                    (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)))