[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compiling lilypond fails
From: |
David Kastrup |
Subject: |
Re: compiling lilypond fails |
Date: |
Fri, 24 Jun 2016 16:43:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Ok, next try.
>From 664bdeb25a2ece31bd42774e1c0c7cadb790ebf1 Mon Sep 17 00:00:00 2001
From: David Kastrup <address@hidden>
Date: Fri, 24 Jun 2016 15:10:44 +0200
Subject: [PATCH] TRANSLATOR_INHERIT -> ENGRAVER_INHERIT
In order to accommodate older g++ compilers, inheriting
methods/listeners/acknowledgers is only provided for engravers now, the
main (and so far sole) customer of this technique.
method_finder is split into both method_finder and listen_finder to
avoid trickier forms of overloading.
---
lily/auto-beam-engraver.cc | 2 +-
lily/beam-engraver.cc | 2 +-
lily/include/coherent-ligature-engraver.hh | 2 +-
lily/include/gregorian-ligature-engraver.hh | 2 +-
lily/include/translator.hh | 11 ++++-------
lily/include/translator.icc | 2 +-
lily/kievan-ligature-engraver.cc | 2 +-
lily/mensural-ligature-engraver.cc | 2 +-
lily/phrasing-slur-engraver.cc | 2 +-
lily/slur-engraver.cc | 2 +-
lily/vaticana-ligature-engraver.cc | 2 +-
11 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc
index 3f03362..4eea5c9 100644
--- a/lily/auto-beam-engraver.cc
+++ b/lily/auto-beam-engraver.cc
@@ -579,7 +579,7 @@ ADD_TRANSLATOR (Auto_beam_engraver,
class Grace_auto_beam_engraver : public Auto_beam_engraver
{
TRANSLATOR_DECLARATIONS (Grace_auto_beam_engraver);
- TRANSLATOR_INHERIT (Auto_beam_engraver);
+ ENGRAVER_INHERIT (Auto_beam_engraver);
private:
Moment last_grace_start_; // Full starting time of last grace group
diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc
index 9b4df64..8065c0d 100644
--- a/lily/beam-engraver.cc
+++ b/lily/beam-engraver.cc
@@ -342,7 +342,7 @@ class Grace_beam_engraver : public Beam_engraver
{
public:
TRANSLATOR_DECLARATIONS (Grace_beam_engraver);
- TRANSLATOR_INHERIT (Beam_engraver);
+ ENGRAVER_INHERIT (Beam_engraver);
protected:
virtual bool valid_start_point ();
diff --git a/lily/include/coherent-ligature-engraver.hh
b/lily/include/coherent-ligature-engraver.hh
index 78bfef8..8c457dd 100644
--- a/lily/include/coherent-ligature-engraver.hh
+++ b/lily/include/coherent-ligature-engraver.hh
@@ -26,7 +26,7 @@ class Coherent_ligature_engraver : public Ligature_engraver
public:
// no TRANSLATOR_DECLARATIONS (Coherent_ligature_engraver) needed
// since this class is abstract
- TRANSLATOR_INHERIT (Ligature_engraver);
+ ENGRAVER_INHERIT (Ligature_engraver);
DECLARE_TRANSLATOR_CALLBACKS (Coherent_ligature_engraver);
protected:
diff --git a/lily/include/gregorian-ligature-engraver.hh
b/lily/include/gregorian-ligature-engraver.hh
index fcac99c..7076a4f 100644
--- a/lily/include/gregorian-ligature-engraver.hh
+++ b/lily/include/gregorian-ligature-engraver.hh
@@ -29,7 +29,7 @@ public:
// no TRANSLATOR_DECLARATIONS (Gregorian_ligature_engraver) needed
// since this class is abstract
- TRANSLATOR_INHERIT(Coherent_ligature_engraver);
+ ENGRAVER_INHERIT (Coherent_ligature_engraver);
DECLARE_TRANSLATOR_CALLBACKS (Gregorian_ligature_engraver);
protected:
Gregorian_ligature_engraver ();
diff --git a/lily/include/translator.hh b/lily/include/translator.hh
index cd05091..977955b 100644
--- a/lily/include/translator.hh
+++ b/lily/include/translator.hh
@@ -34,11 +34,12 @@
VIRTUAL_COPY_CONSTRUCTOR (Translator, NAME); \
virtual void fetch_precomputable_methods (SCM methods[]); \
DECLARE_TRANSLATOR_CALLBACKS (NAME); \
- TRANSLATOR_INHERIT (Translator); \
+ using Translator::method_finder; \
/* end #define */
-#define TRANSLATOR_INHERIT(BASE) \
+#define ENGRAVER_INHERIT(BASE) \
using BASE::method_finder; \
+ using BASE::listen_finder; \
using BASE::ack_finder;
#define DECLARE_TRANSLATOR_CALLBACKS(NAME) \
@@ -48,7 +49,7 @@
return Callback0_wrapper::make_smob<NAME, mf> (); \
} \
template <void (NAME::*mf)(Stream_event *)> \
- static SCM method_finder () \
+ static SCM listen_finder () \
{ \
return Callback_wrapper::make_smob<trampoline<NAME, mf> > (); \
} \
@@ -169,10 +170,6 @@ protected: // should be private.
template <class T, void (T::*)(Grob_info)>
static SCM ack_trampoline (SCM, SCM, SCM);
- // Overriden in Engraver. Don't instantiate.
- template <void (Translator::*)(Grob_info)>
- static SCM ack_finder ();
-
virtual void derived_mark () const;
static SCM event_class_symbol (const char *ev_class);
SCM static_translator_description (const char *grobs,
diff --git a/lily/include/translator.icc b/lily/include/translator.icc
index 3d038b6..cd9fa58 100644
--- a/lily/include/translator.icc
+++ b/lily/include/translator.icc
@@ -112,7 +112,7 @@ void add_acknowledger (SCM ptr,
#define ADD_LISTENER(cl, m) \
listener_list_ = scm_acons \
(event_class_symbol (#m), \
- method_finder<&cl::listen_ ## m> (), \
+ listen_finder<&cl::listen_ ## m> (), \
listener_list_)
#endif /* TRANSLATOR_ICC */
diff --git a/lily/kievan-ligature-engraver.cc b/lily/kievan-ligature-engraver.cc
index ff9e7b9..7b8f2fe 100644
--- a/lily/kievan-ligature-engraver.cc
+++ b/lily/kievan-ligature-engraver.cc
@@ -39,7 +39,7 @@ protected:
public:
TRANSLATOR_DECLARATIONS (Kievan_ligature_engraver);
- TRANSLATOR_INHERIT (Coherent_ligature_engraver);
+ ENGRAVER_INHERIT (Coherent_ligature_engraver);
private:
void fold_up_primitives (vector<Grob_info> const &primitives, Real padding,
Real &min_length);
diff --git a/lily/mensural-ligature-engraver.cc
b/lily/mensural-ligature-engraver.cc
index 874b2eb..271cbef 100644
--- a/lily/mensural-ligature-engraver.cc
+++ b/lily/mensural-ligature-engraver.cc
@@ -62,7 +62,7 @@ protected:
public:
TRANSLATOR_DECLARATIONS (Mensural_ligature_engraver);
- TRANSLATOR_INHERIT (Coherent_ligature_engraver);
+ ENGRAVER_INHERIT (Coherent_ligature_engraver);
private:
void transform_heads (vector<Grob_info> const &primitives);
diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc
index fa402ef..71810d7 100644
--- a/lily/phrasing-slur-engraver.cc
+++ b/lily/phrasing-slur-engraver.cc
@@ -40,7 +40,7 @@ protected:
public:
SCM event_symbol ();
TRANSLATOR_DECLARATIONS (Phrasing_slur_engraver);
- TRANSLATOR_INHERIT (Slur_proto_engraver);
+ ENGRAVER_INHERIT (Slur_proto_engraver);
};
Phrasing_slur_engraver::Phrasing_slur_engraver () :
diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc
index c0c783f..0b1d5ba 100644
--- a/lily/slur-engraver.cc
+++ b/lily/slur-engraver.cc
@@ -38,7 +38,7 @@ class Slur_engraver : public Slur_proto_engraver
public:
SCM event_symbol ();
TRANSLATOR_DECLARATIONS (Slur_engraver);
- TRANSLATOR_INHERIT (Slur_proto_engraver);
+ ENGRAVER_INHERIT (Slur_proto_engraver);
};
Slur_engraver::Slur_engraver () :
diff --git a/lily/vaticana-ligature-engraver.cc
b/lily/vaticana-ligature-engraver.cc
index 6c34e9e..f094db0 100644
--- a/lily/vaticana-ligature-engraver.cc
+++ b/lily/vaticana-ligature-engraver.cc
@@ -77,7 +77,7 @@ private:
public:
TRANSLATOR_DECLARATIONS (Vaticana_ligature_engraver);
- TRANSLATOR_INHERIT (Gregorian_ligature_engraver);
+ ENGRAVER_INHERIT (Gregorian_ligature_engraver);
protected:
virtual Spanner *create_ligature_spanner ();
virtual void transform_heads (Spanner *ligature,
--
2.7.4
--
David Kastrup
- Re: compiling lilypond fails, (continued)
Re: compiling lilypond fails, Thomas Morley, 2016/06/24
- Re: compiling lilypond fails, Phil Holmes, 2016/06/24
- Re: compiling lilypond fails, David Kastrup, 2016/06/24
- Re: compiling lilypond fails, Knut Petersen, 2016/06/24
- Re: compiling lilypond fails, David Kastrup, 2016/06/24
- Re: compiling lilypond fails, Knut Petersen, 2016/06/24
- Re: compiling lilypond fails, David Kastrup, 2016/06/24
- Re: compiling lilypond fails, Knut Petersen, 2016/06/24
- Re: compiling lilypond fails,
David Kastrup <=
- Re: compiling lilypond fails, Knut Petersen, 2016/06/24
- Re: compiling lilypond fails, David Kastrup, 2016/06/24
- Message not available
- Re: compiling lilypond fails, David Kastrup, 2016/06/24
- Re: compiling lilypond fails, David Kastrup, 2016/06/24
- Re: compiling lilypond fails, David Kastrup, 2016/06/25
- Re: compiling lilypond fails, David Kastrup, 2016/06/25
- Re: compiling lilypond fails, Knut Petersen, 2016/06/25
- Re: compiling lilypond fails, David Kastrup, 2016/06/25
- Re: compiling lilypond fails, David Kastrup, 2016/06/25
Re: compiling lilypond fails, Marc Hohl, 2016/06/25