mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
fix handling of multiple values from c functions
* libguile/vm-i-system.c (mv-call, goto/cc): Fix handling of values returns from C or interpreted functions.
This commit is contained in:
parent
ff1592a106
commit
cd829416b2
1 changed files with 2 additions and 2 deletions
|
@ -770,7 +770,7 @@ VM_DEFINE_INSTRUCTION (mv_call, "mv-call", 3, -1, 1)
|
|||
POP (values);
|
||||
values = scm_struct_ref (values, SCM_INUM0);
|
||||
len = scm_length (values);
|
||||
while (!SCM_NULLP (values))
|
||||
for (; !SCM_NULLP (values); values = SCM_CDR (values))
|
||||
PUSH (SCM_CAR (values));
|
||||
PUSH (len);
|
||||
ip += offset;
|
||||
|
@ -884,7 +884,7 @@ VM_DEFINE_INSTRUCTION (goto_cc, "goto/cc", 0, 1, 1)
|
|||
SCM values;
|
||||
values = scm_struct_ref (cont, SCM_INUM0);
|
||||
nvalues = scm_ilength (values);
|
||||
while (!SCM_NULLP (values))
|
||||
for (; !SCM_NULLP (values); values = SCM_CDR (values))
|
||||
PUSH (SCM_CAR (values));
|
||||
goto vm_return_values;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue