From 541842cc98ad2c9869cfc3320669acbd4e141772 Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Fri, 15 Nov 2002 19:26:50 +0000 Subject: [PATCH] When binding optional values, we use two calls to BIND. This means 'BDS-BIND is pushed twice on *unwind-exit*, which results in two calls to bds_unwind1, which is wrong. --- src/cmp/cmplam.lsp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/cmp/cmplam.lsp b/src/cmp/cmplam.lsp index 651df857c..b9921e3c1 100644 --- a/src/cmp/cmplam.lsp +++ b/src/cmp/cmplam.lsp @@ -412,7 +412,11 @@ ) ;; Bind optional parameters as long as there remain arguments. (when optionals - (let ((va-arg-loc 'VA-ARG)) + ;; When binding optional values, we use two calls to BIND. This means + ;; 'BDS-BIND is pushed twice on *unwind-exit*, which results in two calls + ;; to bds_unwind1, which is wrong. A possible fix is to save *unwind-exit* + (let ((*unwind-exit* *unwind-exit*) + (va-arg-loc 'VA-ARG)) (dolist (opt optionals) (push (next-label) labels) (wt-nl "if (i==narg) ") (wt-go (car labels)) @@ -530,7 +534,11 @@ ) ;; Bind optional parameters as long as there remain arguments. (when optionals - (let ((va-arg-loc 'VA-ARG)) + ;; When binding optional values, we use two calls to BIND. This means + ;; 'BDS-BIND is pushed twice on *unwind-exit*, which results in two calls + ;; to bds_unwind1, which is wrong. A possible fix is to save *unwind-exit* + (let ((*unwind-exit* *unwind-exit*) + (va-arg-loc 'VA-ARG)) (dolist (opt optionals) (push (next-label) labels) (wt-nl "if (i==narg) ") (wt-go (car labels))