From: David Kastrup Date: Mon, 6 Jul 2015 16:27:50 +0000 (+0200) Subject: Fix wrong-number-of-args error in Music_function::call X-Git-Tag: release/2.19.23-1~19 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7af10d19158f696eff030e28da3a90dbe3e7d967;p=lilypond.git Fix wrong-number-of-args error in Music_function::call When a music function called via Scheme wanted to report a bad argument type, it instead triggered a Scheme error wrong-number-of-args because of a spurious `location' argument. This was an oversight in issue 4455 and was converted into equivalently bad code by several other issues touching this code. --- diff --git a/lily/music-function.cc b/lily/music-function.cc index d58e324590..9b64e31105 100644 --- a/lily/music-function.cc +++ b/lily/music-function.cc @@ -143,8 +143,7 @@ Music_function::call (SCM rest) if (scm_is_false (scm_call_1 (pred, arg))) { - Lily::argument_error (location, - scm_from_int (scm_ilength (args)), + Lily::argument_error (scm_length (args), pred, arg); SCM val = scm_car (get_signature ()); val = scm_is_pair (val) ? scm_cdr (val) : SCM_BOOL_F;