X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Flily-guile.cc;h=e44e47f4be27f6f30b64817b760191a678e4441f;hb=9f3572d98bb948c9689cd1f75401a029451fa001;hp=e1a0e9bffdc059fde75766d07b559dff3393bd2e;hpb=04265f11d1f21416ccebd2dcaa1d903dc781b36e;p=lilypond.git diff --git a/lily/lily-guile.cc b/lily/lily-guile.cc index e1a0e9bffd..e44e47f4be 100644 --- a/lily/lily-guile.cc +++ b/lily/lily-guile.cc @@ -105,8 +105,10 @@ gulp_file_to_string (string fn, bool must_exist, int size) if (be_verbose_global) progress_indication ("[" + s); - vector chars = gulp_file (s, size); - string result (&chars[0], chars.size ()); + int n = size; + char *str = gulp_file (s, &n); + string result (str, n); + delete[] str; if (be_verbose_global) progress_indication ("]"); @@ -129,7 +131,7 @@ ly_scm2string (SCM str) { assert (scm_is_string (str)); return string (scm_i_string_chars (str), - (int) scm_i_string_length (str)); + (int) scm_i_string_length (str)); } char * @@ -653,14 +655,6 @@ robust_scm2offset (SCM k, Offset o) return o; } -string -robust_scm2string (SCM k, string s) -{ - if (scm_is_string (k)) - s = ly_scm2string (k); - return s; -} - int robust_scm2int (SCM k, int o) { @@ -748,4 +742,3 @@ mangle_cxx_identifier (string cxx_id) cxx_id = replace_all (cxx_id, '_', '-'); return cxx_id; } -