mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
Avoid uses of deprecated forms in the VM code.
Reported by Daniel Kraft <d@domob.eu>. * libguile/frames.c, libguile/vm.c: Include <stdlib.h>, use `size_t' instead of `scm_sizet'. * libguile/objcodes.c, libguile/programs.c, libguile/vm-engine.c, libguile/vm-i-loader.c, libguile/vm-i-system.c: Use `scm_list_X ()' instead of the deprecated `SCM_LISTX ()'.
This commit is contained in:
parent
6ab8238d99
commit
da8b47478e
7 changed files with 29 additions and 26 deletions
|
@ -175,7 +175,7 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
|||
|
||||
vm_error_bad_instruction:
|
||||
err_msg = scm_from_locale_string ("VM: Bad instruction: ~A");
|
||||
finish_args = SCM_LIST1 (scm_from_uchar (ip[-1]));
|
||||
finish_args = scm_list_1 (scm_from_uchar (ip[-1]));
|
||||
goto vm_error;
|
||||
|
||||
vm_error_unbound:
|
||||
|
@ -189,7 +189,7 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
|||
|
||||
vm_error_too_many_args:
|
||||
err_msg = scm_from_locale_string ("VM: Too many arguments");
|
||||
finish_args = SCM_LIST1 (scm_from_int (nargs));
|
||||
finish_args = scm_list_1 (scm_from_int (nargs));
|
||||
goto vm_error;
|
||||
|
||||
vm_error_wrong_num_args:
|
||||
|
@ -202,8 +202,8 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
|||
vm_error_wrong_type_apply:
|
||||
err_msg = scm_from_locale_string ("VM: Wrong type to apply: ~S "
|
||||
"[IP offset: ~a]");
|
||||
finish_args = SCM_LIST2 (program,
|
||||
SCM_I_MAKINUM (ip - bp->base));
|
||||
finish_args = scm_list_2 (program,
|
||||
SCM_I_MAKINUM (ip - bp->base));
|
||||
goto vm_error;
|
||||
|
||||
vm_error_stack_overflow:
|
||||
|
@ -264,7 +264,8 @@ VM_NAME (struct scm_vm *vp, SCM program, SCM *argv, int nargs)
|
|||
vm_error:
|
||||
SYNC_ALL ();
|
||||
|
||||
scm_ithrow (sym_vm_error, SCM_LIST3 (sym_vm_run, err_msg, finish_args), 1);
|
||||
scm_ithrow (sym_vm_error, scm_list_3 (sym_vm_run, err_msg, finish_args),
|
||||
1);
|
||||
}
|
||||
|
||||
abort (); /* never reached */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue