X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fgeneral-scheme.cc;h=8b5766387e0de808afe9c81d567c5cd9dfc16844;hb=5be4c57cff4ebd477b2b3d0899d6725794da77f0;hp=7d4b5c1c30999361db6d9ccfb58e360e61480d1c;hpb=b80683cc94b0c22bbe3fccb94a9b2e23787fd10b;p=lilypond.git diff --git a/lily/general-scheme.cc b/lily/general-scheme.cc index 7d4b5c1c30..8b5766387e 100644 --- a/lily/general-scheme.cc +++ b/lily/general-scheme.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1998--2007 Jan Nieuwenhuizen + (c) 1998--2009 Jan Nieuwenhuizen Han-Wen Nienhuys */ @@ -180,8 +180,9 @@ LY_DEFINE (ly_string_substitute, "ly:string-substitute", LY_ASSERT_TYPE (scm_is_string, s, 3); string ss = ly_scm2string (s); - replace_all (ss, string (scm_i_string_chars (a)), - string (scm_i_string_chars (b))); + replace_all (&ss, ly_scm2string (a), + ly_scm2string (b)); + return ly_string2scm (ss); } @@ -245,11 +246,11 @@ LY_DEFINE (ly_protects, "ly:protects", } LY_DEFINE (ly_gettext, "ly:gettext", - 1, 0, 0, (SCM string), + 1, 0, 0, (SCM original), "A Scheme wrapper function for @code{gettext}.") { - LY_ASSERT_TYPE (scm_is_string, string, 1); - return ly_string2scm (_ (scm_i_string_chars (string))); + LY_ASSERT_TYPE (scm_is_string, original, 1); + return ly_string2scm (_ (ly_scm2string (original).c_str ())); } LY_DEFINE (ly_output_formats, "ly:output-formats", @@ -344,10 +345,11 @@ LY_DEFINE (ly_stderr_redirect, "ly:stderr-redirect", } static SCM -accumulate_symbol (void *closure, SCM key, SCM val, SCM result) +accumulate_symbol (void * /* closure */, + SCM key, + SCM /* val */, + SCM result) { - (void) closure; - (void) val; return scm_cons (key, result); }