]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-guile.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / lily-guile.cc
index 064ed54fabe32b27c46e99ef33e56017f0a2c3e0..e44e47f4be27f6f30b64817b760191a678e4441f 100644 (file)
@@ -105,8 +105,10 @@ gulp_file_to_string (string fn, bool must_exist, int size)
   if (be_verbose_global)
     progress_indication ("[" + s);
 
-  vector<char> 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 ("]");
@@ -114,19 +116,22 @@ gulp_file_to_string (string fn, bool must_exist, int size)
   return result;
 }
 
-void
-ly_display_scm (void *s)
-{
-  scm_display ((SCM)s, scm_current_output_port ());
-  scm_newline (scm_current_output_port ());
-}
+extern "C" {
+  // maybe gdb 5.0 becomes quicker if it doesn't do fancy C++ typing?
+  void
+  ly_display_scm (SCM s)
+  {
+    scm_display (s, scm_current_output_port ());
+    scm_newline (scm_current_output_port ());
+  }
+};
 
 string
 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 *
@@ -737,4 +742,3 @@ mangle_cxx_identifier (string cxx_id)
   cxx_id = replace_all (cxx_id, '_', '-');
   return cxx_id;
 }
-