Comment #4 on issue 2088 by [email protected]: pointer confusion with
clang++
http://code.google.com/p/lilypond/issues/detail?id=2088
Ping. I tried modifying lily-proto.hh, translator-dispatch-list.cc, and
translator-group.hh with the changes listed in comments #1 and #2, and the
lilypond build proceeded past this failure on OS X 10.7 w/ apple-clang
4.2. The build crashed later on grob.cc, so I can't verify that the
changes did not hurt something else.
diff -ruN lilypond-2.15.42-orig/lily/include/lily-proto.hh
lilypond-2.15.42/lily/include/lily-proto.hh
--- lilypond-2.15.42-orig/lily/include/lily-proto.hh 2012-08-02
13:43:06.000000000 -0400
+++ lilypond-2.15.42/lily/include/lily-proto.hh 2013-02-20
20:49:33.000000000 -0500
@@ -199,8 +199,7 @@
class Transposed_music;
class yyFlexLexer;
-typedef void (*Engraver_void_function_engraver_grob_info) (Engraver *,
- Grob_info);
-typedef void (*Translator_void_method_ptr) (Translator *);
+typedef void (Engraver::* Engraver_void_function_engraver_grob_info)
(Grob_info);
+typedef void (Translator::* Translator_void_method_ptr) ();
#endif /* LILY_PROTO_HH */
diff -ruN lilypond-2.15.42-orig/lily/include/translator-group.hh
lilypond-2.15.42/lily/include/translator-group.hh
--- lilypond-2.15.42-orig/lily/include/translator-group.hh 2012-08-02
13:43:06.000000000 -0400
+++ lilypond-2.15.42/lily/include/translator-group.hh 2013-02-20
20:50:31.000000000 -0500
@@ -43,7 +43,7 @@
void invoke ()
{
if (method_)
- (*method_) (translator_);
+ (translator_->*method_) ();
}
};
diff -ruN lilypond-2.15.42-orig/lily/translator-dispatch-list.cc
lilypond-2.15.42/lily/translator-dispatch-list.cc
--- lilypond-2.15.42-orig/lily/translator-dispatch-list.cc 2012-08-02
13:43:06.000000000 -0400
+++ lilypond-2.15.42/lily/translator-dispatch-list.cc 2013-02-20
20:50:08.000000000 -0500
@@ -32,7 +32,7 @@
if (e.engraver_ == origin)
continue;
- (*e.function_) (e.engraver_, gi);
+ ((e.engraver_)->*(e.function_)) (gi);
}
}
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings