From 1cc0b6addee57984524d23abc86f9930222bc0e5 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 26 Jan 2011 21:44:12 +0100 Subject: [PATCH] fix error-handling of apply to non-list * libguile/vm-engine.c (vm_error_apply_to_non_list): Sync registers before erroring. Fix type of finish_args. Thanks to Hans Aberg for the report. --- THANKS | 1 + libguile/vm-engine.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/THANKS b/THANKS index 96b9eadac..607d80177 100644 --- a/THANKS +++ b/THANKS @@ -21,6 +21,7 @@ Contributors since the last release: For fixes or providing information which led to a fix: + Hans Aberg David Allouche Andrew Bagdanov Martin Baulig diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c index e69167f31..341dbc8a7 100644 --- a/libguile/vm-engine.c +++ b/libguile/vm-engine.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -154,8 +154,9 @@ VM_NAME (SCM vm, SCM program, SCM *argv, int nargs) goto vm_error; vm_error_apply_to_non_list: + SYNC_ALL (); scm_error (scm_arg_type_key, "apply", "Apply to non-list: ~S", - finish_args, finish_args); + scm_list_1 (finish_args), scm_list_1 (finish_args)); goto vm_error; vm_error_kwargs_length_not_even: