From 678e984f1fff190745b2fb00afce26f894f43e32 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Thu, 18 Sep 2014 11:03:06 +0200 Subject: [PATCH] Issue 4110: Patch up GUILE 2.0 SCM_SMOB_OBJECT*_LOC API, broken 2009-2014 --- lily/include/small-smobs.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.39.2