* libguile/vm-i-system.c (return/values): In the
multiple-values-to-a-single-value-continuation (or MV but where N=1),
null out the correct number of values from the stack. Fixes aborts on
(apply values '(1)).
* testsuite/t-values.scm (call-with-values): Add a test.
*++sp = stack_base[1];
/* Finally set new stack_base */
- NULLSTACK (stack_base - sp);
+ NULLSTACK (stack_base - sp + nvalues + 1);
stack_base = SCM_FRAME_UPPER_ADDRESS (fp) - 1;
}
else
;; the start-stack forces a bounce through the interpreter
(call-with-values
(lambda () (start-stack 'foo (values 1 2)))
+ list)
+
+ (call-with-values
+ (lambda () (apply values '(1)))
list))