]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-guile.cc
* lily/dots.cc (print): replace -
[lilypond.git] / lily / lily-guile.cc
index 0a7c8362d6a2c139e5efd95bd862faff7574a052..f418df157d8e5076bb00fea350911a21fb932bc4 100644 (file)
@@ -111,7 +111,7 @@ gulp_file_to_string (String fn, bool must_exist)
 
   int n;
   char *str = gulp_file (s, &n);
-  String result (str);
+  String result ((Byte*) str, n);
   delete[] str;
   
   if (verbose_global_b)
@@ -127,12 +127,7 @@ LY_DEFINE (ly_gulp_file, "ly:gulp-file",
 {
   SCM_ASSERT_TYPE (scm_is_string (name), name, SCM_ARG1, __FUNCTION__, "string");
   String contents = gulp_file_to_string (ly_scm2string (name), true);
-
-  char * data ;
-  SCM scm_str = scm_i_make_string (contents.length(), &data);
-  memcpy (data, contents.get_bytes(),  contents.length());
-  
-  return scm_str;
+  return scm_from_locale_stringn (contents.get_str0 (), contents.length ());
 }