]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix wrong-number-of-args error in Music_function::call
authorDavid Kastrup <dak@gnu.org>
Mon, 6 Jul 2015 16:27:50 +0000 (18:27 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 6 Jul 2015 16:37:19 +0000 (18:37 +0200)
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.

lily/music-function.cc

index d58e324590f12c6abaf770d6235ec5f900d288d6..9b64e311057fe643fe3a3a32f3b6946aa3069953 100644 (file)
@@ -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;