]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/break-substitution.cc
* Documentation/user/music-glossary.tely: add @omf tags
[lilypond.git] / lily / break-substitution.cc
index 31a887e20cafd39eaf2de6326fa60d170d9e49f9..fe3b1ea182cbbdc17c37604bb0d8cbbd2e530dc0 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 
 #include  "grob.hh"
 #include "item.hh"
@@ -328,22 +329,22 @@ Spanner::fast_fubstitute_grob_list (SCM sym,
   /*
     Only do this complicated thing for large lists. This has the added
     advantage that we won't screw up the ordering for elements in
-    alignments (which typically don't have more than 100 grobs.)
+    alignments (which typically don't have more than 10 grobs.)
    */
   
-  if (len < 100)
+  if (len < 300)
     return false;
 
 
   /*
-    TODO : should not reallocate every time? 
+    TODO : should not free it some time? 
    */
   static Substitution_entry * vec;
   static int vec_room;
 
   if (vec_room < len)
     {
-      vec = (Substitution_entry*) scm_realloc (vec, sizeof (Substitution_entry) * len);
+      vec = (Substitution_entry*) realloc (vec, sizeof (Substitution_entry) * len);
       vec_room = len;
     }