From: Devon Schudy Date: Wed, 25 Jun 2014 00:55:44 +0000 (-0400) Subject: Don't depend on features removed in Guile 2.1. (issue 3972) X-Git-Tag: release/2.19.11-1~50 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b0e291860d77581f0ff27d5b26f8632fc0bdbeba;p=lilypond.git Don't depend on features removed in Guile 2.1. (issue 3972) * Replace scm_listify with scm_list_*. (It's been deprecated for a long time.) * Use scm_protects only when available (Guile versions <2.1). --- diff --git a/lily/general-scheme.cc b/lily/general-scheme.cc index 19d0af73ca..95d4081f39 100644 --- a/lily/general-scheme.cc +++ b/lily/general-scheme.cc @@ -271,7 +271,12 @@ LY_DEFINE (ly_protects, "ly:protects", 0, 0, 0, (), "Return hash of protected objects.") { + //scm_protects is available only in Guile versions before 2.1. +#if SCM_MAJOR_VERSION < 2 || SCM_MAJOR_VERSION == 2 && SCM_MINOR_VERSION < 1 return scm_protects; +#else + return programming_error ("ly:protects is not supported in Guile 2.1"); +#endif } LY_DEFINE (ly_gettext, "ly:gettext", diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index 63e114a3fe..d678ec848a 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -121,15 +121,15 @@ inline SCM ly_bool2scm (bool x) { return scm_from_bool (x); } inline SCM ly_append2 (SCM x1, SCM x2) { - return scm_append (scm_listify (x1, x2, SCM_UNDEFINED)); + return scm_append (scm_list_2 (x1, x2)); } inline SCM ly_append3 (SCM x1, SCM x2, SCM x3) { - return scm_append (scm_listify (x1, x2, x3, SCM_UNDEFINED)); + return scm_append (scm_list_3 (x1, x2, x3)); } inline SCM ly_append4 (SCM x1, SCM x2, SCM x3, SCM x4) { - return scm_append (scm_listify (x1, x2, x3, x4, SCM_UNDEFINED)); + return scm_append (scm_list_4 (x1, x2, x3, x4)); } /*