From: David Kastrup Date: Thu, 18 Sep 2014 09:03:06 +0000 (+0200) Subject: Issue 4110: Patch up GUILE 2.0 SCM_SMOB_OBJECT*_LOC API, broken 2009-2014 X-Git-Tag: release/2.19.15-1~19 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=678e984f1fff190745b2fb00afce26f894f43e32;p=lilypond.git Issue 4110: Patch up GUILE 2.0 SCM_SMOB_OBJECT*_LOC API, broken 2009-2014 --- diff --git a/lily/include/small-smobs.hh b/lily/include/small-smobs.hh index 1794cfe0c9..0a3f6f0d2d 100644 --- a/lily/include/small-smobs.hh +++ b/lily/include/small-smobs.hh @@ -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