]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4110: Patch up GUILE 2.0 SCM_SMOB_OBJECT*_LOC API, broken 2009-2014
authorDavid Kastrup <dak@gnu.org>
Thu, 18 Sep 2014 09:03:06 +0000 (11:03 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 23 Sep 2014 08:06:53 +0000 (10:06 +0200)
lily/include/small-smobs.hh

index 1794cfe0c9240d4ad04115fe6bc0e8a77bcc1f26..0a3f6f0d2d54163034a66a9c3907a3cdfb5faa5d 100644 (file)
@@ -3,6 +3,16 @@
 
 #include "smobs.hh"
 
+#if GUILEV2
+// Fix the APIs of GUILE2.x, broken in 2009--2014
+#undef SCM_SMOB_OBJECT_LOC
+#undef SCM_SMOB_OBJECT_2_LOC
+#undef SCM_SMOB_OBJECT_3_LOC
+#define SCM_SMOB_OBJECT_LOC(x)          (SCM_SMOB_OBJECT_N_LOC ((x), 1))
+#define SCM_SMOB_OBJECT_2_LOC(x)        (SCM_SMOB_OBJECT_N_LOC ((x), 2))
+#define SCM_SMOB_OBJECT_3_LOC(x)        (SCM_SMOB_OBJECT_N_LOC ((x), 3))
+#endif
+
 // This is tricky: the small smobs contain all the data in the smob
 // itself.  Any derived classes must _not_ contain any data members or
 // be polymorphic (contain a virtual table pointer) as there is no