]> git.donarmstrong.com Git - lilypond.git/commitdiff
Don't depend on features removed in Guile 2.1. (issue 3972)
authorDevon Schudy <dschudy@gmail.com>
Wed, 25 Jun 2014 00:55:44 +0000 (20:55 -0400)
committerJames Lowe <pkx166h@gmail.com>
Tue, 15 Jul 2014 05:19:38 +0000 (06:19 +0100)
* Replace scm_listify with scm_list_*. (It's been deprecated for a long time.)
* Use scm_protects only when available (Guile versions <2.1).

lily/general-scheme.cc
lily/include/lily-guile.hh

index 19d0af73caf6a338f7169991d36b32a6bae452be..95d4081f3938863d160fa5d07d61aca5d3488ee3 100644 (file)
@@ -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",
index 63e114a3fedf520d08c9df2cd2ecdff7067d70cb..d678ec848a6250fee0b8ca18aa0fae4143d201d5 100644 (file)
@@ -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));
 }
 
 /*