From: David Kastrup Date: Mon, 11 Mar 2013 07:54:03 +0000 (+0100) Subject: Simplify a function pointer cast that GUB chokes on X-Git-Tag: release/2.17.14-1^0 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0364212c01e7874c7f729f5c7080b58464d1b68a;p=lilypond.git Simplify a function pointer cast that GUB chokes on It is conceivable that the C++ compiler has problems converting a pointer to a C function (declared in a C language header) to a C++ function pointer. Or that it has a compiler bug making it choke on too complex casts. This commit changes the cast (SCM (*)()) apply_unpure_pure to (scm_t_subr) apply_unpure_pure which hopefully addresses both of these potential candidates for GUB compilation failure. --- diff --git a/lily/unpure-pure-container.cc b/lily/unpure-pure-container.cc index 05e9c4bcc8..9b2f871769 100644 --- a/lily/unpure-pure-container.cc +++ b/lily/unpure-pure-container.cc @@ -137,7 +137,7 @@ void init_unpure_pure_container () unpure_pure_call_tag = scm_make_smob_type ("unpure-pure-call", 0); scm_set_smob_mark (unpure_pure_call_tag, scm_markcdr); scm_set_smob_apply (unpure_pure_call_tag, - (SCM (*)()) apply_unpure_pure, 2, 0, 1); + (scm_t_subr) apply_unpure_pure, 2, 0, 1); }; ADD_SCM_INIT_FUNC (unpure_pure_container, init_unpure_pure_container);