From: David Kastrup Date: Fri, 30 May 2014 11:11:33 +0000 (+0200) Subject: Issue 3936: ly:music-list? should return #f for non-lists X-Git-Tag: release/2.19.8-1~19 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0c224ebd8f0faff87ddb319cb16d2dad5122bd3c;p=lilypond.git Issue 3936: ly:music-list? should return #f for non-lists --- diff --git a/lily/music-scheme.cc b/lily/music-scheme.cc index 55f1333bf5..ffd3f35a0f 100644 --- a/lily/music-scheme.cc +++ b/lily/music-scheme.cc @@ -101,13 +101,15 @@ LY_DEFINE (ly_music_list_p, "ly:music-list?", 1, 0, 0, (SCM lst), "Is @var{lst} a list of music objects?") { - if (scm_list_p (lst) == SCM_BOOL_T) - while (scm_is_pair (lst)) - { - if (!unsmob_music (scm_car (lst))) - return SCM_BOOL_F; - lst = scm_cdr (lst); - } + if (!ly_is_list (lst)) + return SCM_BOOL_F; + + while (scm_is_pair (lst)) + { + if (!unsmob_music (scm_car (lst))) + return SCM_BOOL_F; + lst = scm_cdr (lst); + } return SCM_BOOL_T; }