]> git.donarmstrong.com Git - lilypond.git/commitdiff
(derived_mark): new method. Yes. We
authorhanwen <hanwen>
Thu, 4 Aug 2005 11:11:31 +0000 (11:11 +0000)
committerhanwen <hanwen>
Thu, 4 Aug 2005 11:11:31 +0000 (11:11 +0000)
have to protect even those unlikely-to-be-corrupted data members.

ChangeLog
THANKS
VERSION
lily/auto-beam-engraver.cc
lily/clef-engraver.cc
lily/hara-kiri-engraver.cc
lily/stanza-number-engraver.cc
lily/time-signature-engraver.cc
lily/volta-engraver.cc

index 346116ce3d96d9aaa2ea53cfee1fad50846a3a03..7393877f33ebc88ad4dcfa053f6acc1504b49d62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-04  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+       * lily/auto-beam-engraver.cc (derived_mark): new method. Yes. We
+       have to protect even those unlikely-to-be-corrupted data members.  
+  
 2005-08-03  Mats Bengtsson  <mabe@drongo.s3.kth.se>
 
        * Documentation/user/lilypond-book.itely (An example of a
diff --git a/THANKS b/THANKS
index 0d007c6070379e29ae105df36c5eeaad37c0f6f4..aef612c9ec38949c57fa1eabcd3d8bbb23cc278e 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -74,6 +74,7 @@ Bruce McIntyre
 Bruce Fairchild
 Daniel Johnson
 David Rogers
+Donald Axel
 Dylan Nicholson
 Ed Jackson
 Erik Ronström
diff --git a/VERSION b/VERSION
index 4dbc56432810550be8c3bbe218dd7a2bd6ae3093..c39372e5e7259cb6e8708408fdf55db4b4330312 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,6 +1,6 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=6
-PATCH_LEVEL=2
+PATCH_LEVEL=3
 MY_PATCH_LEVEL=
 
index 46f0bf36bb6c5f649a192222b5e94f41bb923d84..7dc86355aae6b1822e224db55013a240285128c9 100644 (file)
@@ -29,6 +29,7 @@ protected:
   virtual void finalize ();
   virtual void acknowledge_grob (Grob_info);
   virtual void process_acknowledged_grobs ();
+  virtual void derived_mark () const;
 
 private:
   bool test_moment (Direction, Moment);
@@ -63,11 +64,18 @@ private:
 
   // We act as if beam were created, and start a grouping anyway.
   Beaming_info_list *grouping_;
-  SCM beam_settings_;          // ugh. should protect ? 
+  SCM beam_settings_;
 
   Beaming_info_list *finished_grouping_;
 };
 
+void
+Auto_beam_engraver::derived_mark () const
+{
+  scm_gc_mark (beam_settings_);
+}
+
+
 void
 Auto_beam_engraver::process_music ()
 {
@@ -150,7 +158,13 @@ Auto_beam_engraver::create_beam ()
   if (to_boolean (get_property ("skipTypesetting")))
     return 0;
 
-  Spanner *beam = new Spanner (beam_settings_, context ()->get_grob_key ("Beam"));
+  /*
+    Can't use make_spanner_from_properties() because we have to use
+    beam_settings_.
+   */
+  Spanner *beam = new Spanner (beam_settings_,
+                              context ()->get_grob_key ("Beam"));
+
   for (int i = 0; i < stems_->size (); i++)
     {
       /*
index e7a0d003045da9accfed077dc02c672bd29388f0..30ec5bfaa14a969e29192de94b5cc7e022b24b09 100644 (file)
@@ -25,6 +25,8 @@ public:
   Direction octave_dir_;
 
 protected:
+
+  virtual void derived_mark () const;
   virtual void stop_translation_timestep ();
   virtual void process_music ();
   virtual void acknowledge_grob (Grob_info);
@@ -40,6 +42,14 @@ private:
   void inspect_clef_properties ();
 };
 
+void
+Clef_engraver::derived_mark () const
+{
+  scm_gc_mark (prev_octavation_);
+  scm_gc_mark (prev_cpos_);
+  scm_gc_mark (prev_glyph_);
+}
+
 Clef_engraver::Clef_engraver ()
 {
   clef_ = 0;
@@ -49,7 +59,7 @@ Clef_engraver::Clef_engraver ()
   /*
     will trigger a clef at the start since #f != ' ()
   */
-  prev_cpos_ = prev_glyph_ = SCM_BOOL_F;
+  prev_octavation_ = prev_cpos_ = prev_glyph_ = SCM_BOOL_F;
 }
 
 void
index 343bdb08c84c3ad28a1c29af3bd9c7b9d15115fe..54eed38fe20a402cf6c94acd6adfb91d7c86a59d 100644 (file)
@@ -20,10 +20,18 @@ protected:
   virtual void add_element (Grob *e);
   virtual void start_translation_timestep ();
 
+  virtual void derived_mark () const;
+  
   SCM interesting_;
 public:
   TRANSLATOR_DECLARATIONS (Hara_kiri_engraver);
 };
+void
+Hara_kiri_engraver::derived_mark () const
+{
+  scm_gc_mark (interesting_);
+}
+  
 
 void
 Hara_kiri_engraver::start_translation_timestep ()
index d74f0d8bcb5dbbb978e80c3d6c7f3aa9057c4742..0c9c18fed386379644d64596c096c8b9c6e36058 100644 (file)
@@ -26,6 +26,12 @@ public:
   virtual void acknowledge_grob (Grob_info);
 };
 
+void
+Stanza_number_engraver::derived_mark () const
+{
+  scm_gc_mark (last_stanza_);
+}
+
 /*
   TODO: should make engraver that collects all the stanzas on a higher
   level, and then groups them to the side. Stanza numbers should be
@@ -34,6 +40,8 @@ public:
 
 Stanza_number_engraver::Stanza_number_engraver ()
 {
+  last_stanza_ = SCM_EOL;
+  
   text_ = 0;
 }
 
index 77fd444f129f399ab70f0277491f6811668341e8..b3c9dd3bfa38208d199688626c4e039207387868 100644 (file)
@@ -20,12 +20,20 @@ class Time_signature_engraver : public Engraver
   SCM last_time_fraction_;
 
 protected:
+  virtual void derived_mark () const;
   virtual void stop_translation_timestep ();
   virtual void process_music ();
 public:
   TRANSLATOR_DECLARATIONS (Time_signature_engraver);
 };
 
+void
+Time_signature_engraver::derived_mark () const
+{
+  scm_gc_mark (last_time_fraction_);
+}
+
+  
 Time_signature_engraver::Time_signature_engraver ()
 {
   time_signature_ = 0;
index 03e940650d32e43ac20ee09c4758b4a255b9e60b..2590d0ed5397d9e0a8a06686f0edda4b5bbea5b0 100644 (file)
@@ -30,6 +30,7 @@ protected:
   virtual void stop_translation_timestep ();
   virtual void process_music ();
 
+  virtual void derived_mark () const;
   Moment started_mom_;
   Spanner *volta_span_;
   Spanner *end_volta_span_;
@@ -39,8 +40,16 @@ protected:
   bool staff_eligible ();
 };
 
+void
+Volta_engraver::derived_mark () const
+{
+  scm_gc_mark (staff_);
+  scm_gc_mark (start_string_);
+}
+
 Volta_engraver::Volta_engraver ()
 {
+  start_string_ = SCM_EOL;
   staff_ = SCM_EOL;
   volta_span_ = 0;
   end_volta_span_ = 0;