[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH 1/2] Make `call/cc` continuations behave like `
From: |
Kooda |
Subject: |
[Chicken-hackers] [PATCH 1/2] Make `call/cc` continuations behave like `values` ones. |
Date: |
Fri, 8 Sep 2017 01:46:15 +0200 |
This makes the relaxed cases for multiple values work when using
`call/cc` to pass multiple values to the continuation instead of `values`.
This fixes ticket #1390
---
runtime.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/runtime.c b/runtime.c
index ba2ec26d..a415d004 100644
--- a/runtime.c
+++ b/runtime.c
@@ -7094,10 +7094,7 @@ void C_ccall C_call_cc(C_word c, C_word *av)
if(C_immediatep(cont) || C_header_bits(cont) != C_CLOSURE_TYPE)
barf(C_BAD_ARGUMENT_TYPE_ERROR, "call-with-current-continuation", cont);
- /* Check for values-continuation: */
- if(C_block_item(k, 0) == (C_word)values_continuation)
- wrapper = C_closure(&a, 2, (C_word)call_cc_values_wrapper, k);
- else wrapper = C_closure(&a, 2, (C_word)call_cc_wrapper, k);
+ wrapper = C_closure(&a, 2, (C_word)call_cc_values_wrapper, k);
av2[ 0 ] = cont;
av2[ 1 ] = k;
--
2.14.1