1
Fork 0
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:
Andy Wingo 2008-09-25 12:08:54 +02:00
parent ff1592a106
commit cd829416b2

View file

@ -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;
}