X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Flily-guile.hh;h=e2a74c779f17a1c2b2835c7b5ab3d9914a590558;hb=5f68ba5ca0edd64f0f6723e65c27993c2dfb1e96;hp=e67293e06f89c3c4897097722899b1e692e53f41;hpb=e11dc9a89c31b64615bcdcb8b536621ded30176b;p=lilypond.git diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index e67293e06f..e2a74c779f 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -91,6 +91,12 @@ SCM ly_truncate_list (int k, SCM l ); #define CACHE_SYMBOLS #ifdef CACHE_SYMBOLS + +/* + We don't use gh_symbol2scm directly, since it has const-correctness + problems in GUILE 1.3.4 + + */ SCM my_gh_symbol2scm (const char* x); // #warning: CACHE_SYMBOLS @@ -108,12 +114,12 @@ SCM my_gh_symbol2scm (const char* x); SCM value = cached; /* We store this one locally, since G++ -O2 fucks up else */ \ if ( __builtin_constant_p ((x)))\ { if (!cached)\ - value = cached = scm_gc_protect_object (my_gh_symbol2scm((char*) (x)));\ + value = cached = scm_gc_protect_object (my_gh_symbol2scm((x)));\ } else\ value = gh_symbol2scm ((char*) (x)); \ value; }) #else -inline SCM ly_symbol2scm(char const* x) { return gh_symbol2scm((char*)x); } +inline SCM ly_symbol2scm(char const* x) { return gh_symbol2scm((x)); } #endif