]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/main.cc (setup_guile_env): new function. Set GC min_yields
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 24 Jul 2005 19:31:02 +0000 (19:31 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 24 Jul 2005 19:31:02 +0000 (19:31 +0000)
higher. This increases memory footprint, but provides overall
speedup of 15 to 20%.

* lily/grob.cc (Grob): look properties up directly.

90 files changed:
ChangeLog
lily/accidental-engraver.cc
lily/accidental-placement.cc
lily/accidental.cc
lily/align-interface.cc
lily/all-font-metrics.cc
lily/axis-group-interface.cc
lily/bar-line.cc
lily/beam-concave.cc
lily/beam-engraver.cc
lily/beam.cc
lily/break-align-interface.cc
lily/break-substitution.cc
lily/breathing-sign.cc
lily/chord-tremolo-engraver.cc
lily/clef-engraver.cc
lily/cluster-engraver.cc
lily/coherent-ligature-engraver.cc
lily/completion-note-heads-engraver.cc
lily/custos-engraver.cc
lily/default-bar-line-engraver.cc
lily/directional-element-interface.cc
lily/dot-column.cc
lily/drum-note-engraver.cc
lily/duration-scheme.cc
lily/dynamic-engraver.cc
lily/easy-notation.cc
lily/fingering-engraver.cc
lily/font-metric-scheme.cc
lily/font-metric.cc
lily/font-size-engraver.cc
lily/gregorian-ligature-engraver.cc
lily/grob-interface-scheme.cc
lily/grob-scheme.cc
lily/grob.cc
lily/hara-kiri-group-spanner.cc
lily/include/paper-column-engraver.hh
lily/input-scheme.cc
lily/lexer.ll
lily/lily-guile.cc
lily/lily-lexer.cc
lily/line-interface.cc
lily/lookup.cc
lily/lyric-engraver.cc
lily/main.cc
lily/mark-engraver.cc
lily/mensural-ligature-engraver.cc
lily/modified-font-metric.cc
lily/multi-measure-rest-engraver.cc
lily/music-scheme.cc
lily/new-fingering-engraver.cc
lily/note-collision.cc
lily/note-head.cc
lily/note-heads-engraver.cc
lily/ottava-engraver.cc
lily/output-def-scheme.cc
lily/paper-column-engraver.cc
lily/paper-def.cc
lily/paper-system-scheme.cc
lily/parser.yy
lily/part-combine-iterator.cc
lily/piano-pedal-engraver.cc
lily/pitch-scheme.cc
lily/pitched-trill-engraver.cc
lily/rest-collision.cc
lily/rest-engraver.cc
lily/rest.cc
lily/scm-hash.cc
lily/script-column.cc
lily/script-engraver.cc
lily/self-aligment-interface.cc
lily/side-position-interface.cc
lily/slur.cc
lily/spaceable-grob.cc
lily/span-bar.cc
lily/staff-symbol-referencer.cc
lily/stem-engraver.cc
lily/stem.cc
lily/stencil-interpret.cc
lily/system.cc
lily/tab-note-heads-engraver.cc
lily/tab-staff-symbol-engraver.cc
lily/text-engraver.cc
lily/timing-translator.cc
lily/trill-spanner-engraver.cc
lily/tuplet-bracket.cc
lily/tuplet-engraver.cc
lily/vaticana-ligature-engraver.cc
lily/vertical-align-engraver.cc
lily/volta-engraver.cc

index d6b4a7733bcd804dbde7fea87531413e16ff84a6..228a0cba1717d0d098536f945ba9b805a12e6a22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2005-07-24  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/*: cleanups: use scm_from_int iso. scm_int2num. Idem for
+       scm_from_real / scm_make_real.
+
+       * lily/main.cc (setup_guile_env): new function. Set GC min_yields
+       higher. This increases memory footprint, but provides overall
+       speedup of 15 to 20%. 
+
        * lily/include/translator.hh (class Translator): remove
        PRECOMPUTED_VIRTUAL everywhere.
 
index 1354495fc40acdbcffb24c6a1a2bd2c6d3156adb..c11d63c48d2ef95fc4e664b3fbbf487c989cef09 100644 (file)
@@ -192,15 +192,15 @@ number_accidentals_from_sig (bool *different, SCM sig, Pitch *pitch,
 
   SCM previous_alteration = SCM_BOOL_F;
 
-  SCM from_same_octave = ly_assoc_get (scm_cons (scm_int2num (o),
-                                                scm_int2num (n)), sig, SCM_BOOL_F);
-  SCM from_key_signature = ly_assoc_get (scm_int2num (n), sig, SCM_BOOL_F);
+  SCM from_same_octave = ly_assoc_get (scm_cons (scm_from_int (o),
+                                                scm_from_int (n)), sig, SCM_BOOL_F);
+  SCM from_key_signature = ly_assoc_get (scm_from_int (n), sig, SCM_BOOL_F);
   SCM from_other_octaves = SCM_BOOL_F;
   for (SCM s = sig; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM entry = scm_car (s);
       if (scm_is_pair (scm_car (entry))
-         && scm_cdar (entry) == scm_int2num (n))
+         && scm_cdar (entry) == scm_from_int (n))
        from_other_octaves = scm_cdr (entry);
     }
 
@@ -386,12 +386,12 @@ Accidental_engraver::create_accidental (Accidental_entry *entry,
   else
     a = make_standard_accidental (note, support, entry->origin_engraver_);
  
-  SCM accs = scm_cons (scm_int2num (pitch->get_alteration ()),
+  SCM accs = scm_cons (scm_from_int (pitch->get_alteration ()),
                       SCM_EOL);
   if (restore_natural)
     {
       if (to_boolean (get_property ("extraNatural")))
-       accs = scm_cons (scm_int2num (0), accs);
+       accs = scm_cons (scm_from_int (0), accs);
     }
   
   /* TODO: add cautionary option in accidental. */
@@ -504,7 +504,7 @@ Accidental_engraver::stop_translation_timestep ()
       int n = pitch->get_notename ();
       int o = pitch->get_octave ();
       int a = pitch->get_alteration ();
-      SCM key = scm_cons (scm_int2num (o), scm_int2num (n));
+      SCM key = scm_cons (scm_from_int (o), scm_from_int (n));
 
       SCM localsig = SCM_EOL;
       while (origin
@@ -518,7 +518,7 @@ Accidental_engraver::stop_translation_timestep ()
                that of the tied note and of the key signature.
              */
              localsig = ly_assoc_front_x
-               (localsig, key, scm_cons (SCM_BOOL_T, scm_int2num (barnum)));
+               (localsig, key, scm_cons (SCM_BOOL_T, scm_from_int (barnum)));
 
              change = true;
            }
@@ -529,8 +529,8 @@ Accidental_engraver::stop_translation_timestep ()
                noteheads with the same notename.
              */
              localsig = ly_assoc_front_x (localsig, key,
-                                          scm_cons (scm_int2num (a),
-                                                    scm_int2num (barnum)));
+                                          scm_cons (scm_from_int (a),
+                                                    scm_from_int (barnum)));
              change = true;
            }
 
index 43055409cb0ad2d4eb339edab2289534ff59bc1e..92c7e98c994693185975ec968c84c30c8e7b1d10 100644 (file)
@@ -32,7 +32,7 @@ Accidental_placement::alignment_callback (SCM s, SCM)
       position_accidentals (par);
     }
 
-  return scm_int2num (0);
+  return scm_from_int (0);
 }
 
 void
@@ -54,7 +54,7 @@ Accidental_placement::add_accidental (Grob *me, Grob *a)
   int n = p->get_notename ();
 
   SCM accs = me->get_object ("accidental-grobs");
-  SCM key = scm_int2num (n);
+  SCM key = scm_from_int (n);
   SCM entry = scm_assq (key, accs);
   if (entry == SCM_BOOL_F)
     {
index 61536c4ed44d3df9f6848d067228e0d89ce2b5da..ad781baeded6b98f5c16adedb6bb91ef9f2ca7b5 100644 (file)
@@ -214,7 +214,7 @@ Accidental_interface::print (SCM smob)
       */
       ac = scm_cons (scm_list_1 (scm_cons
                                 (ly_symbol2scm ("font-size"),
-                                 scm_int2num (-2))),
+                                 scm_from_int (-2))),
                     ac);
       fm = select_font (me->get_layout (), ac);
     }
index ba4322d8bb0b906fb89aed10562cf6b9adfb6a64..2f9a52aae9bbd23127d5fae5ff03e9ed02f31794 100644 (file)
@@ -26,7 +26,7 @@ Align_interface::alignment_callback (SCM element_smob, SCM axis)
     {
       Align_interface::align_elements_to_extents (par, ax);
     }
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 MAKE_SCHEME_CALLBACK (Align_interface, fixed_distance_alignment_callback, 2);
@@ -40,7 +40,7 @@ Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis)
     {
       Align_interface::align_to_fixed_distance (par, ax);
     }
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 /*
index c4a2c616763dcf6374adfd8edc5b82fc14f879ee..bc21a30ea8c864dabe11590d09cda8153ebcfe4f 100644 (file)
@@ -89,7 +89,7 @@ All_font_metrics::find_pango_font (PangoFontDescription *description,
        progress_indication ("]");
 
       pf->description_ = scm_cons (SCM_BOOL_F,
-                                  scm_make_real (1.0));
+                                  scm_from_double (1.0));
     }
   g_free (pango_fn);
   return dynamic_cast<Pango_font *> (unsmob_metrics (val));
@@ -152,7 +152,7 @@ All_font_metrics::find_afm (String name)
       unsmob_metrics (val)->file_name_ = file_name;
 
       unsmob_metrics (val)->description_ = scm_cons (name_string,
-                                                    scm_make_real (1.0));
+                                                    scm_from_double (1.0));
 
       if (be_verbose_global)
        progress_indication ("]");
@@ -222,7 +222,7 @@ All_font_metrics::find_otf (String name)
 
       unsmob_metrics (val)->file_name_ = file_name;
       unsmob_metrics (val)->description_ = scm_cons (name_string,
-                                                    scm_make_real (1.0));
+                                                    scm_from_double (1.0));
       otf_dict_->set (sname, val);
       unsmob_metrics (val)->unprotect ();
     }
@@ -264,7 +264,7 @@ All_font_metrics::find_tfm (String name)
 
       unsmob_metrics (val)->file_name_ = file_name;
       unsmob_metrics (val)->description_ = scm_cons (name_string,
-                                                    scm_make_real (1.0));
+                                                    scm_from_double (1.0));
       tfm_dict_->set (sname, val);
       unsmob_metrics (val)->unprotect ();
     }
index 11b00e97c8d0aee81f8df56b4d6259901dc728a5..87bb2754fef741df064f1b7d1b46a31d2dbb7ceb 100644 (file)
@@ -82,8 +82,8 @@ Axis_group_interface::group_extent_callback (SCM element_smob, SCM scm_axis)
 void
 Axis_group_interface::set_axes (Grob *me, Axis a1, Axis a2)
 {
-  SCM sa1 = scm_int2num (a1);
-  SCM sa2 = scm_int2num (a2);
+  SCM sa1 = scm_from_int (a1);
+  SCM sa2 = scm_from_int (a2);
 
   SCM axes = me->get_property ("axes");
 
index f8942db710777bf48c81b8c943134f7f0d7c2ae8..8ae2c2ff05e970dae1a9b0516f2e029aa0ebb0a7 100644 (file)
@@ -170,7 +170,7 @@ Bar_line::before_line_breaking (SCM smob)
   if (scm_is_string (g) && bsd)
     {
       SCM proc = me->get_property ("break-glyph-function");
-      g = scm_call_2 (proc, g, scm_int2num (bsd));
+      g = scm_call_2 (proc, g, scm_from_int (bsd));
     }
 
   if (!scm_is_string (g))
@@ -194,7 +194,7 @@ Bar_line::get_staff_bar_size (SCM smob)
   Real ss = Staff_symbol_referencer::staff_space (me);
   SCM size = me->get_property ("bar-size");
   if (scm_is_number (size))
-    return scm_make_real (scm_to_double (size) * ss);
+    return scm_from_double (scm_to_double (size) * ss);
   else if (Staff_symbol_referencer::get_staff_symbol (me))
     {
       /*
@@ -204,9 +204,9 @@ Bar_line::get_staff_bar_size (SCM smob)
       */
       Real ysize = (Staff_symbol_referencer::line_count (me) -1);
       ysize = ysize * ss + Staff_symbol_referencer::line_thickness (me);
-      return scm_make_real (ysize);
+      return scm_from_double (ysize);
     }
-  return scm_int2num (0);
+  return scm_from_int (0);
 }
 
 ADD_INTERFACE (Bar_line, "bar-line-interface",
index 2643bfaa22817416ac391241d347b236e4d0f2d1..edd95394a50f38f7e5cd1337d9ac6129075f818d 100644 (file)
@@ -133,7 +133,7 @@ Beam::check_concave (SCM smob)
 
       r /= Staff_symbol_referencer::staff_space (me);
       me->set_property ("positions", ly_interval2scm (Drul_array<Real> (r, r)));
-      me->set_property ("least-squares-dy", scm_make_real (0));
+      me->set_property ("least-squares-dy", scm_from_double (0));
     }
   else
     {
index 07c2c9046a14da00ebb5ffc62df859ca14142159..b6168fb863b1681cc6525a346e7ee9f52d089191 100644 (file)
@@ -264,7 +264,7 @@ Beam_engraver::acknowledge_stem (Grob_info info)
        }
 
       stem->set_property ("duration-log",
-                         scm_int2num (durlog));
+                         scm_from_int (durlog));
       Moment stem_location = now - beam_start_mom_ + beam_start_location_;
       beam_info_->add_stem (stem_location,
                            max (durlog- 2, 0));
index 7e52a825e2f03cc171f03750328d55785b04eb3f..a7c9a61e718ea60ff4f92e96b7eae681119ccc11 100644 (file)
@@ -74,7 +74,7 @@ Beam::get_beam_translation (Grob *me)
 
   if (ly_is_procedure (func))
     {
-      SCM s = scm_call_2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
+      SCM s = scm_call_2 (func, me->self_scm (), scm_from_int (get_beam_count (me)));
       return scm_to_double (s);
     }
   else
@@ -115,7 +115,7 @@ Beam::space_function (SCM smob, SCM beam_count)
     ? (2 * staff_space + line - thickness) / 2.0
     : (3 * staff_space + line - thickness) / 3.0;
 
-  return scm_make_real (beam_translation);
+  return scm_from_double (beam_translation);
 }
 
 /* After pre-processing all directions should be set.
@@ -200,7 +200,7 @@ position_with_maximal_common_beams (SCM left_beaming, SCM right_beaming,
       for (SCM s = scm_car (right_beaming); scm_is_pair (s); s = scm_cdr (s))
        {
          int k = -right_dir * scm_to_int (scm_car (s)) + i;
-         if (scm_c_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F)
+         if (scm_c_memq (scm_from_int (k), left_beaming) != SCM_BOOL_F)
            count++;
        }
 
@@ -250,7 +250,7 @@ Beam::connect_beams (Grob *me)
                    = start_point - this_dir * scm_to_int (scm_car (s));
 
                  new_slice.add_point (new_beam_pos);
-                 scm_set_car_x (s, scm_int2num (new_beam_pos));
+                 scm_set_car_x (s, scm_from_int (new_beam_pos));
                }
            }
          while (flip (&d) != LEFT);
@@ -265,7 +265,7 @@ Beam::connect_beams (Grob *me)
          for (; scm_is_pair (s); s = scm_cdr (s))
            {
              int np = -this_dir * scm_to_int (scm_car (s));
-             scm_set_car_x (s, scm_int2num (np));
+             scm_set_car_x (s, scm_from_int (np));
              last_int.add_point (np);
            }
        }
@@ -438,7 +438,7 @@ Beam::print (SCM grob)
              int t = Stem::duration_log (st);
 
              SCM proc = me->get_property ("flag-width-function");
-             SCM result = scm_call_1 (proc, scm_int2num (t));
+             SCM result = scm_call_1 (proc, scm_from_int (t));
              nw_f = scm_to_double (result);
            }
          else
@@ -544,10 +544,10 @@ Beam::get_default_dir (Grob *me)
 
   SCM func = me->get_property ("dir-function");
   SCM s = scm_call_2 (func,
-                     scm_cons (scm_int2num (count[UP]),
-                               scm_int2num (count[DOWN])),
-                     scm_cons (scm_int2num (total[UP]),
-                               scm_int2num (total[DOWN])));
+                     scm_cons (scm_from_int (count[UP]),
+                               scm_from_int (count[DOWN])),
+                     scm_cons (scm_from_int (total[UP]),
+                               scm_from_int (total[DOWN])));
 
   if (scm_is_number (s) && scm_to_int (s))
     return to_dir (s);
@@ -675,7 +675,7 @@ Beam::consider_auto_knees (Grob *me)
          Direction d = (head_extents.center () < max_gap.center ())
            ? UP : DOWN;
 
-         stem->set_property ("direction", scm_int2num (d));
+         stem->set_property ("direction", scm_from_int (d));
 
          head_extents.intersect (max_gap);
          assert (head_extents.is_empty () || head_extents.length () < 1e-6);
@@ -720,7 +720,7 @@ Beam::set_stem_shorten (Grob *me)
   shorten_f *= forced_fraction;
 
   if (shorten_f)
-    me->set_property ("shorten", scm_make_real (shorten_f));
+    me->set_property ("shorten", scm_from_double (shorten_f));
 }
 
 /*  Call list of y-dy-callbacks, that handle setting of
@@ -860,7 +860,7 @@ Beam::least_squares (SCM smob)
        where the second part goes.
       */
       me->set_property ("least-squares-dy",
-                       scm_make_real (pos[RIGHT] - pos[LEFT]));
+                       scm_from_double (pos[RIGHT] - pos[LEFT]));
     }
   else
     {
@@ -881,7 +881,7 @@ Beam::least_squares (SCM smob)
       dy = slope * dx;
 
       set_minimum_dy (me, &dy);
-      me->set_property ("least-squares-dy", scm_make_real (dy));
+      me->set_property ("least-squares-dy", scm_from_double (dy));
       pos = Interval (y, (y + dy));
     }
 
@@ -1278,19 +1278,19 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
   (void) axis;
 
   if (scm_is_number (rest->get_property ("staff-position")))
-    return scm_int2num (0);
+    return scm_from_int (0);
 
   assert (scm_to_int (axis) == Y_AXIS);
 
   Grob *st = unsmob_grob (rest->get_object ("stem"));
   Grob *stem = st;
   if (!stem)
-    return scm_make_real (0.0);
+    return scm_from_double (0.0);
   Grob *beam = unsmob_grob (stem->get_object ("beam"));
   if (!beam
       || !Beam::has_interface (beam)
       || !Beam::visible_stem_count (beam))
-    return scm_make_real (0.0);
+    return scm_from_double (0.0);
 
   Drul_array<Real> pos (0, 0);
   SCM s = beam->get_property ("positions");
@@ -1345,7 +1345,7 @@ Beam::rest_collision_callback (SCM element_smob, SCM axis)
       < rad)
     shift = ceil (fabs (shift)) * sign (shift);
 
-  return scm_make_real (staff_space * shift);
+  return scm_from_double (staff_space * shift);
 }
 
 bool
index 7d377cefdd0859b99c99b3245fb82bc68847b5c5..b9232ef6fa9b8647d44e5a471ae60e0a051b971f 100644 (file)
@@ -36,7 +36,7 @@ Break_align_interface::alignment_callback (SCM element_smob, SCM axis)
       Break_align_interface::do_alignment (par);
     }
 
-  return scm_make_real (0);
+  return scm_from_double (0);
 }
 
 MAKE_SCHEME_CALLBACK (Break_align_interface, self_align_callback, 2);
@@ -51,7 +51,7 @@ Break_align_interface::self_align_callback (SCM element_smob, SCM axis)
   Direction bsd = item->break_status_dir ();
   if (bsd == LEFT)
     {
-      me->set_property ("self-alignment-X", scm_int2num (RIGHT));
+      me->set_property ("self-alignment-X", scm_from_int (RIGHT));
     }
 
   /*
@@ -80,7 +80,7 @@ Break_align_interface::ordered_elements (Grob *grob)
 
   Link_array<Grob> writable_elts (elts);
   SCM order = scm_vector_ref (order_vec,
-                             scm_int2num (me->break_status_dir () + 1));
+                             scm_from_int (me->break_status_dir () + 1));
 
   /*
     Copy in order specified in BREAK-ALIGN-ORDER.
index b49aaffa394df4a434160648508a5f20725cf50d..ea85a6e7e8c9a487ea751db9ef5b381a1803a6c3 100644 (file)
@@ -105,7 +105,7 @@ do_break_substitution (SCM src)
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
       for (int i = 0; i < len; i++)
        {
-         SCM si = scm_int2num (i);
+         SCM si = scm_from_int (i);
          scm_vector_set_x (nv, si,
                            do_break_substitution (scm_vector_ref (src, si)));
        }
index 0b244431b52fbc71350ee30a6932da302953af6b..6343dffa8c82cf59ec5a4be6dfe9b521d0d8c10f 100644 (file)
@@ -183,7 +183,7 @@ Breathing_sign::offset_callback (SCM element_smob, SCM)
 
   Real inter_f = Staff_symbol_referencer::staff_space (me) / 2;
   int sz = Staff_symbol_referencer::line_count (me) - 1;
-  return scm_make_real (inter_f * sz * d);
+  return scm_from_double (inter_f * sz * d);
 }
 
 ADD_INTERFACE (Breathing_sign, "breathing-sign-interface",
index 94f657b09e186b614b1a6b97bc7c7df1a6f4b3b1..a11536eb647cd3212348c8b0cda7338ea856ea84 100644 (file)
@@ -154,7 +154,7 @@ Chord_tremolo_engraver::acknowledge_stem (Grob_info info)
 
       if (Stem::duration_log (s) != 1)
        {
-         beam_->set_property ("gap-count", scm_int2num (flags_ - total_duration_flags_));
+         beam_->set_property ("gap-count", scm_from_int (flags_ - total_duration_flags_));
        }
 
       if (info.music_cause ()->is_mus_type ("rhythmic-event"))
@@ -176,7 +176,7 @@ Chord_tremolo_engraver::acknowledge_stem (Grob_info info)
     {
       stem_tremolo_ = make_item ("StemTremolo", repeat_->self_scm ());
       stem_tremolo_->set_property ("flag-count",
-                                  scm_int2num (flags_));
+                                  scm_from_int (flags_));
       stem_tremolo_->set_object ("stem",
                                   info.grob ()->self_scm ());
       stem_tremolo_->set_parent (info.grob (), X_AXIS);
index 4be3bb35cef30de25b5754684cf5aa2f6d4f048e..eba9b464208dfd0b04e485b72ab7efa4e191337f 100644 (file)
@@ -102,7 +102,7 @@ Clef_engraver::create_clef ()
          int dir = sign (abs_oct);
          abs_oct = abs (abs_oct) + 1;
 
-         SCM txt = scm_number_to_string (scm_int2num (abs_oct),
+         SCM txt = scm_number_to_string (scm_from_int (abs_oct),
                                          scm_from_int (10));
 
          g->set_property ("text",
@@ -112,7 +112,7 @@ Clef_engraver::create_clef ()
 
          g->set_parent (clef_, Y_AXIS);
          g->set_parent (clef_, X_AXIS);
-         g->set_property ("direction", scm_int2num (dir));
+         g->set_property ("direction", scm_from_int (dir));
          octavate_ = g;
        }
     }
index eff1695eb33ea68864ccc8c16d25c8fc54e1d45d..33f91adb2919aa506f2374ea2040d01e95803fa2 100644 (file)
@@ -92,8 +92,8 @@ Cluster_spanner_engraver::process_music ()
 
       beacon_ = make_item ("ClusterSpannerBeacon", cluster_notes_[0]->self_scm ());
       beacon_->set_property ("positions",
-                            scm_cons (scm_int2num (pmin),
-                                      scm_int2num (pmax)));
+                            scm_cons (scm_from_int (pmin),
+                                      scm_from_int (pmax)));
     }
 
   if (beacon_ && !spanner_)
index f9dfcfe31b8dfb65afe4458e79fa3956f6bc9d98..61588019da9260963f656706f3fa84e0d413eb90 100644 (file)
@@ -143,7 +143,7 @@ Coherent_ligature_engraver::get_set_column (Item *item, Paper_column *column)
                                           "setting `spacing-increment="
                                           "0.01': ptr=%ul", parent));
              sibling_parent->set_property ("forced-spacing",
-                                           scm_make_real (0.01));
+                                           scm_from_double (0.01));
 #endif
              sibling->set_parent (column, X_AXIS);
            }
@@ -188,12 +188,12 @@ compute_delta_pitches (Array<Grob_info> primitives)
        {
          delta_pitch = pitch - prev_pitch;
          prev_primitive->set_property ("delta-pitch",
-                                       scm_int2num (delta_pitch));
+                                       scm_from_int (delta_pitch));
        }
       prev_pitch = pitch;
       prev_primitive = primitive;
     }
-  primitive->set_property ("delta-pitch", scm_int2num (0));
+  primitive->set_property ("delta-pitch", scm_from_int (0));
 }
 
 void
index 7a0061f9b9878eb795850abbfa47dcd5322aeffb..a76d0cb99dfa793439ea055d459667bc1b78da28 100644 (file)
@@ -223,7 +223,7 @@ Completion_heads_engraver::process_music ()
 
       Item *note = make_item ("NoteHead", event->self_scm ());
       note->set_property ("duration-log",
-                         scm_int2num (note_dur.duration_log ()));
+                         scm_from_int (note_dur.duration_log ()));
 
       int dots = note_dur.dot_count ();
       if (dots)
@@ -235,7 +235,7 @@ Completion_heads_engraver::process_music ()
            measly attempt to save an eeny-weenie bit of memory.
          */
          if (dots != scm_to_int (d->get_property ("dot-count")))
-           d->set_property ("dot-count", scm_int2num (dots));
+           d->set_property ("dot-count", scm_from_int (dots));
 
          d->set_parent (note, Y_AXIS);
          dots_.push (d);
@@ -248,7 +248,7 @@ Completion_heads_engraver::process_music ()
       if (scm_is_number (c0))
        pos += scm_to_int (c0);
 
-      note->set_property ("staff-position", scm_int2num (pos));
+      note->set_property ("staff-position", scm_from_int (pos));
       notes_.push (note);
     }
 
index 4ece68ae236c87ebfdd75b90c7675d2efbc5f7b1..6b137c921c7b8e956b6680ac6439bd970646b221 100644 (file)
@@ -108,7 +108,7 @@ Custos_engraver::process_acknowledged ()
            p += scm_to_int (c0);
 
          c->set_property ("staff-position",
-                          scm_int2num (p));
+                          scm_from_int (p));
        }
 
       pitches_.clear ();
index 2203faa6d542dfcfc6a67ac00cb7181bb8f53f97..3e3ce632807f826c51aa7f54318f2ba7abfa4169 100644 (file)
@@ -19,8 +19,8 @@ protected:
   /* Need to know whether we're advancing in grace notes, or not. */
   Moment last_moment_;
 
-  PRECOMPUTED_VIRTUAL void start_translation_timestep ();
-  PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
+  void start_translation_timestep ();
+  void stop_translation_timestep ();
 
 public:
   TRANSLATOR_DECLARATIONS (Default_bar_line_engraver);
index 5ab19596a72016a6788debe62ca8c7d4f9270392..3d7514cad624b7940e73c85f6fdd3fc718169f69 100644 (file)
@@ -21,6 +21,6 @@ get_grob_direction (Grob *me)
 void
 set_grob_direction (Grob *me, Direction d)
 {
-  SCM sd = scm_int2num (d);
+  SCM sd = scm_from_int (d);
   me->set_property ("direction", sd);
 }
index ec43a4373505da3043ce2435ec917350d1629b62..ec00373261a4b5b4a9240b9760f589b9836ffd74 100644 (file)
@@ -40,7 +40,7 @@ Dot_column::force_shift_callback (SCM element_smob, SCM axis)
 
       do_shifts (me);
     }
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 MAKE_SCHEME_CALLBACK (Dot_column, side_position, 2);
index f75658a19ce5e4a0879227cb6c5d9e02f7e05d1b..221fe7b44fd945475f315a9477cff3925f212fd1 100644 (file)
@@ -65,7 +65,7 @@ Drum_notes_engraver::process_music ()
 
       Duration dur = *unsmob_duration (ev->get_property ("duration"));
 
-      note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
+      note->set_property ("duration-log", scm_from_int (dur.duration_log ()));
 
       if (dur.dot_count ())
        {
@@ -74,7 +74,7 @@ Drum_notes_engraver::process_music ()
 
          if (dur.dot_count ()
              != robust_scm2int (d->get_property ("dot-count"), 0))
-           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+           d->set_property ("dot-count", scm_from_int (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
 
index 1d840a753e2e9649005ad69ec6cd9f5acdf3fa31..10a4bd16b28ff0a63a0eca4aa89063765be58614 100644 (file)
@@ -71,7 +71,7 @@ LY_DEFINE (ly_make_duration, "ly:make-duration",
       compress = true;
     }
   else
-    num = scm_int2num (1);
+    num = scm_from_int (1);
 
   if (den != SCM_UNDEFINED)
     {
@@ -79,7 +79,7 @@ LY_DEFINE (ly_make_duration, "ly:make-duration",
       compress = true;
     }
   else
-    den = scm_int2num (1);
+    den = scm_from_int (1);
 
   Duration p (scm_to_int (length), dots);
   if (compress)
@@ -93,7 +93,7 @@ LY_DEFINE (ly_duration_log, "ly:duration-log",
           "Extract the duration log from @var{dur}")
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
-  return scm_int2num (unsmob_duration (dur)->duration_log ());
+  return scm_from_int (unsmob_duration (dur)->duration_log ());
 }
 
 LY_DEFINE (ly_duration_dot_count, "ly:duration-dot-count",
@@ -101,7 +101,7 @@ LY_DEFINE (ly_duration_dot_count, "ly:duration-dot-count",
           "Extract the dot count from @var{dur}")
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
-  return scm_int2num (unsmob_duration (dur)->dot_count ());
+  return scm_from_int (unsmob_duration (dur)->dot_count ());
 }
 
 LY_DEFINE (ly_intlog2, "ly:intlog2",
@@ -110,7 +110,7 @@ LY_DEFINE (ly_intlog2, "ly:intlog2",
 {
   SCM_ASSERT_TYPE (scm_is_number (d), d, SCM_ARG1, __FUNCTION__, "integer");
   int log = intlog2 (scm_to_int (d));
-  return scm_int2num (log);
+  return scm_from_int (log);
 }
 
 LY_DEFINE (ly_duration_factor, "ly:duration-factor",
@@ -119,5 +119,5 @@ LY_DEFINE (ly_duration_factor, "ly:duration-factor",
 {
   SCM_ASSERT_TYPE (unsmob_duration (dur), dur, SCM_ARG1, __FUNCTION__, "duration");
   Rational r = unsmob_duration (dur)->factor ();
-  return scm_cons (scm_int2num (r.num ()), scm_int2num (r.den ()));
+  return scm_cons (scm_from_int (r.num ()), scm_from_int (r.den ()));
 }
index a8ba235d333b0e3c53203bdc791e240332bea7a9..47990741560cb380a9cfe4733fe689c20d664290 100644 (file)
@@ -228,7 +228,7 @@ Dynamic_engraver::process_music ()
                                                     finished_cresc_);
                }
              cresc_->set_property ("grow-direction",
-                                   scm_int2num ((start_type == "crescendo")
+                                   scm_from_int ((start_type == "crescendo")
                                                 ? BIGGER : SMALLER));
            }
 
index 6311e8a07522e3ac47223839e841fd8541773f5a..00e93f190527bcf208b54b0f3892bfdfaac1a5d9 100644 (file)
@@ -30,7 +30,7 @@ Note_head::brew_ez_stencil (SCM smob)
   SCM spitch = unsmob_music (cause)->get_property ("pitch");
   Pitch *pit = unsmob_pitch (spitch);
 
-  SCM idx = scm_int2num (pit->get_notename ());
+  SCM idx = scm_from_int (pit->get_notename ());
   SCM names = me->get_property ("note-names");
   SCM charstr = SCM_EOL;
   if (scm_is_vector (names))
index 49dfaed32b340cc0a8f8fda97de883062b82ad81..2fa125744e7e5ddb6e829bf5d7a01ddfa4bf4660 100644 (file)
@@ -107,18 +107,18 @@ Fingering_engraver::make_script (Direction d, Music *r, int i)
   /* See script-engraver.cc */
   priority += i;
 
-  fingering->set_property ("script-priority", scm_int2num (priority));
+  fingering->set_property ("script-priority", scm_from_int (priority));
 
   if (!is_direction (fingering->get_property ("direction")))
     {
       if (d)
-       fingering->set_property ("direction", scm_int2num (d));
+       fingering->set_property ("direction", scm_from_int (d));
       else
-       fingering->set_property ("direction", scm_int2num (RIGHT));
+       fingering->set_property ("direction", scm_from_int (RIGHT));
     }
 
   SCM dig = r->get_property ("digit");
-  fingering->set_property ("text", scm_number_to_string (dig, scm_int2num (10)));
+  fingering->set_property ("text", scm_number_to_string (dig, scm_from_int (10)));
 
   fingerings_.push (fingering);
 }
index 6b7c606423662bba1ff131bbfeddaea8fb45f5c2..5928c2066c33e35d2c542c195dd5864884293f1b 100644 (file)
@@ -137,6 +137,6 @@ LY_DEFINE (ly_font_design_size, "ly:font-design-size", 1, 0, 0,
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return scm_make_real (fm->design_size ());
+  return scm_from_double (fm->design_size ());
 }
 
index a3acc19d88c68fc0be9f9ef527c6d6df67148c43..5909b7ee9561e8f1b99c571d66dcab20d162d4af 100644 (file)
@@ -153,7 +153,7 @@ Stencil
 Font_metric::get_ascii_char_stencil (int code) const
 {
   SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (),
-                      scm_int2num (code));
+                      scm_from_int (code));
   Box b = get_ascii_char (code);
   return Stencil (b, at);
 }
@@ -162,7 +162,7 @@ Stencil
 Font_metric::get_indexed_char_stencil (int code) const
 {
   int idx = index_to_ascii (code);
-  SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (), scm_int2num (idx));
+  SCM at = scm_list_3 (ly_symbol2scm ("char"), self_scm (), scm_from_int (idx));
   Box b = get_indexed_char (code);
   return Stencil (b, at);
 }
index 580afac3033141c37f7e6206943d9ab3c98179ea..d1b4e5580b11d41beb8b533b2e8d0919c1b3076f 100644 (file)
@@ -46,7 +46,7 @@ Font_size_engraver::acknowledge_font (Grob_info gi)
 
   Real font_size = size
     + robust_scm2double (gi.grob ()->get_property ("font-size"), 0);
-  gi.grob ()->set_property ("font-size", scm_make_real (font_size));
+  gi.grob ()->set_property ("font-size", scm_from_double (font_size));
 }
 
 #include "translator.icc"
index 4958274a2e14af17eb986ed1956095b5b3a37181..4098070e0685f7cc59a6b389e7aaddfdb66a4557 100644 (file)
@@ -186,7 +186,7 @@ void check_and_fix_all_prefixes (Array<Grob_info> primitives)
       /* all other combinations should be valid (unless I made a
         mistake) */
 
-      primitive->set_property ("prefix-set", scm_int2num (prefix_set));
+      primitive->set_property ("prefix-set", scm_from_int (prefix_set));
     }
 }
 
@@ -234,7 +234,7 @@ provide_context_info (Array<Grob_info> primitives)
 
       if (prev_primitive)
        prev_primitive->set_property ("context-info",
-                                     scm_int2num (prev_context_info));
+                                     scm_from_int (prev_context_info));
       prev_primitive = primitive;
       prev_prefix_set = prefix_set;
       prev_context_info = context_info;
@@ -242,7 +242,7 @@ provide_context_info (Array<Grob_info> primitives)
     }
   if (prev_primitive)
     prev_primitive->set_property ("context-info",
-                                 scm_int2num (prev_context_info));
+                                 scm_from_int (prev_context_info));
 }
 
 void
index 17737991e7e383f4c3bf7b1666c9f3afee7ec96d..f26c62c2b9588c7cae9898dd2ea7ac46071046fd 100644 (file)
@@ -19,7 +19,7 @@ LY_DEFINE (ly_add_interface, "ly:add-interface", 3, 0, 0, (SCM a, SCM b, SCM c),
   SCM_ASSERT_TYPE (scm_is_string (b), b, SCM_ARG2, __FUNCTION__, "string");
   SCM_ASSERT_TYPE (ly_is_list (c), c, SCM_ARG3, __FUNCTION__, "list of syms");
   if (!scm_is_vector (all_ifaces))
-    all_ifaces = scm_make_vector (scm_int2num (40), SCM_EOL);
+    all_ifaces = scm_make_vector (scm_from_int (40), SCM_EOL);
 
   SCM entry = scm_list_n (a, b, c, SCM_UNDEFINED);
 
index 07ac9dd820828def3e8a24e47e6cd94adc9bc02a..3d5d83f4fb7ba6baf2e30fd1aadddd96295336b7 100644 (file)
@@ -238,7 +238,7 @@ LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
 {
   Item *me = dynamic_cast<Item *> (unsmob_grob (it));
   SCM_ASSERT_TYPE (me, it, SCM_ARG1, __FUNCTION__, "Item");
-  return scm_int2num (me->break_status_dir ());
+  return scm_from_int (me->break_status_dir ());
 }
 
 LY_DEFINE (ly_grob_key, "ly:grob-key",
index 05fab21494820843ece5d14f028d4ab13d0675d1..bcf0f473b3e86593ba7e7f248f9e200dcf4ebddc 100644 (file)
@@ -372,7 +372,7 @@ Grob::handle_prebroken_dependencies ()
   if (original_)
     {
       Item *it = dynamic_cast<Item *> (this);
-      substitute_object_links (scm_int2num (it->break_status_dir ()),
+      substitute_object_links (scm_from_int (it->break_status_dir ()),
                               original_->object_alist_);
     }
 }
@@ -419,8 +419,8 @@ Grob::get_offset (Axis a) const
   while (dim_cache_[a].offsets_left_)
     {
       int l = --me->dim_cache_[a].offsets_left_;
-      SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_, scm_int2num (l));
-      SCM retval = scm_call_2 (cb, self_scm (), scm_int2num (a));
+      SCM cb = scm_list_ref (dim_cache_[a].offset_callbacks_, scm_from_int (l));
+      SCM retval = scm_call_2 (cb, self_scm (), scm_from_int (a));
 
       Real r = scm_to_double (retval);
       if (isinf (r) || isnan (r))
@@ -467,7 +467,7 @@ Grob::extent (Grob *refp, Axis a) const
     ;
   else if (ly_is_procedure (d->dimension_callback_)
           && d->dimension_ == SCM_EOL)
-    d->dimension_ = scm_call_2 (d->dimension_callback_, self_scm (), scm_int2num (a));
+    d->dimension_ = scm_call_2 (d->dimension_callback_, self_scm (), scm_from_int (a));
   else
     return ext;
 
index eac63e509335e3f7d51723f019bf24ba97c550f3..0fad67b533b96beed735f7a1c9dd231cff28213b 100644 (file)
@@ -66,7 +66,7 @@ Hara_kiri_group_spanner::force_hara_kiri_callback (SCM element_smob, SCM axis)
   
   assert (scm_to_int (axis) == Y_AXIS);
   consider_suicide (me);
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 MAKE_SCHEME_CALLBACK (Hara_kiri_group_spanner, force_hara_kiri_in_parent_callback, 2);
@@ -77,7 +77,7 @@ Hara_kiri_group_spanner::force_hara_kiri_in_parent_callback (SCM element_smob, S
   Axis a = (Axis) scm_to_int (axis);
   assert (a == Y_AXIS);
   force_hara_kiri_callback (daughter->get_parent (a)->self_scm (), axis);
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 void
index dae914de8a64ecf90cca2af75800f4f168196a7c..8c82d0dadb54742e5ea7838befc403d349753624 100644 (file)
@@ -21,9 +21,9 @@ class Paper_column_engraver : public Engraver
   TRANSLATOR_DECLARATIONS(Paper_column_engraver);
 
 protected:
-  PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
-  PRECOMPUTED_VIRTUAL void start_translation_timestep ();
-  PRECOMPUTED_VIRTUAL void process_music ();
+  void stop_translation_timestep ();
+  void start_translation_timestep ();
+  void process_music ();
   virtual void initialize ();
   virtual void finalize ();
   virtual bool try_music (Music*);
index b38b6a999b15ce0bb00c14da2c841994e139db22..5bfed5c60d7f8adc5637806b4d73720aa3860234 100644 (file)
@@ -43,9 +43,9 @@ LY_DEFINE (ly_input_file_line_column, "ly:input-file-line-char-column", 1, 0, 0,
   int l, ch, col; 
   ip->get_counts (&l, &ch, &col);
   return scm_list_4 (scm_makfrom0str (ip->file_string ().to_str0 ()),
-                    scm_int2num (l),
-                    scm_int2num (ch),
-                    scm_int2num (col));
+                    scm_from_int (l),
+                    scm_from_int (ch),
+                    scm_from_int (col));
 }
 
 LY_DEFINE (ly_input_both_locations, "ly:input-both-locations", 1, 0, 0, (SCM sip),
@@ -54,8 +54,8 @@ LY_DEFINE (ly_input_both_locations, "ly:input-both-locations", 1, 0, 0, (SCM sip
   Input *ip = unsmob_input (sip);
   SCM_ASSERT_TYPE (ip, sip, SCM_ARG1, __FUNCTION__, "input location");
   return scm_list_5 (scm_makfrom0str (ip->file_string ().to_str0 ()),
-                    scm_int2num (ip->line_number ()),
-                    scm_int2num (ip->column_number ()),
-                    scm_int2num (ip->end_line_number ()),
-                    scm_int2num (ip->end_column_number ()));
+                    scm_from_int (ip->line_number ()),
+                    scm_from_int (ip->column_number ()),
+                    scm_from_int (ip->end_line_number ()),
+                    scm_from_int (ip->end_column_number ()));
 }
index 47a25a30020d9fb9d52e0b199a4c926ff1463ffa..130bd472ebd5d0d81b5f25144edb825ed24794c0 100644 (file)
@@ -571,7 +571,7 @@ BOM_UTF8    \357\273\277
        int cnv = sscanf (YYText (), "%lf", &r);
        assert (cnv == 1);
 
-       yylval.scm = scm_make_real (r);
+       yylval.scm = scm_from_double (r);
        return REAL;
 }
 
@@ -857,7 +857,7 @@ scan_fraction (String frac)
 
        int n = String_convert::dec2int (left);
        int d = String_convert::dec2int (right);
-       return scm_cons (scm_int2num (n), scm_int2num (d));
+       return scm_cons (scm_from_int (n), scm_from_int (d));
 }
 
 // Breaks for flex 2.5.31
index 2ebc9beee68be121b3f48410a2cd8cdd95324018..1f28e78d60d8b9f91f3f8d89f7f624ed3b55dd49 100644 (file)
@@ -268,7 +268,7 @@ ly_scm2realdrul (SCM p)
 SCM
 ly_interval2scm (Drul_array<Real> i)
 {
-  return scm_cons (scm_make_real (i[LEFT]), scm_make_real (i[RIGHT]));
+  return scm_cons (scm_from_double (i[LEFT]), scm_from_double (i[RIGHT]));
 }
 
 bool
@@ -300,7 +300,7 @@ appendable_list_append (SCM l, SCM elt)
 SCM
 ly_offset2scm (Offset o)
 {
-  return scm_cons (scm_make_real (o[X_AXIS]), scm_make_real (o[Y_AXIS]));
+  return scm_cons (scm_from_double (o[X_AXIS]), scm_from_double (o[Y_AXIS]));
 }
 
 Offset
@@ -321,7 +321,7 @@ ly_deep_copy (SCM src)
       SCM nv = scm_c_make_vector (len, SCM_UNDEFINED);
       for (int i = 0;i < len; i++)
        {
-         SCM si = scm_int2num (i);
+         SCM si = scm_from_int (i);
          scm_vector_set_x (nv, si, ly_deep_copy (scm_vector_ref (src, si)));
        }
     }
index 06ab799acc0760a0b661c8231046d7c2254ff94a..b1661c86eb1950504ecdf493370437139d30debb 100644 (file)
@@ -98,7 +98,7 @@ Lily_lexer::Lily_lexer (Sources *sources)
 
   add_scope (ly_make_anonymous_module (false));
   push_note_state (scm_c_make_hash_table (0));
-  chordmodifier_tab_ = scm_make_vector (scm_int2num (1), SCM_EOL);
+  chordmodifier_tab_ = scm_make_vector (scm_from_int (1), SCM_EOL);
 }
 
 Lily_lexer::Lily_lexer (Lily_lexer const &src)
index c759004e3c9e63a90cc152bbfc6d4da62d80aca9..81019e210ee0718db5ef5ffa1ba9b8290ff93b41 100644 (file)
@@ -39,11 +39,11 @@ Line_interface::make_dashed_line (Real thick, Offset from, Offset to,
   Real off = dash_period - on;
 
   SCM at = scm_list_n (ly_symbol2scm ("dashed-line"),
-                      scm_make_real (thick),
-                      scm_make_real (on),
-                      scm_make_real (off),
-                      scm_make_real (to[X_AXIS] - from[X_AXIS]),
-                      scm_make_real (to[Y_AXIS] - from[Y_AXIS]),
+                      scm_from_double (thick),
+                      scm_from_double (on),
+                      scm_from_double (off),
+                      scm_from_double (to[X_AXIS] - from[X_AXIS]),
+                      scm_from_double (to[Y_AXIS] - from[Y_AXIS]),
                       SCM_UNDEFINED);
 
   Box box;
@@ -62,11 +62,11 @@ Stencil
 Line_interface::make_line (Real th, Offset from, Offset to)
 {
   SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
-                      scm_make_real (th),
-                      scm_make_real (from[X_AXIS]),
-                      scm_make_real (from[Y_AXIS]),
-                      scm_make_real (to[X_AXIS]),
-                      scm_make_real (to[Y_AXIS]),
+                      scm_from_double (th),
+                      scm_from_double (from[X_AXIS]),
+                      scm_from_double (from[Y_AXIS]),
+                      scm_from_double (to[X_AXIS]),
+                      scm_from_double (to[Y_AXIS]),
                       SCM_UNDEFINED);
 
   Box box;
index 10e8bb7d5bdee25022fb41ef5babc73fdca48ee1..2e1164ce504f48404b96f61c4d68fbe9e95f6662 100644 (file)
@@ -27,9 +27,9 @@ Stencil
 Lookup::dot (Offset p, Real radius)
 {
   SCM at = (scm_list_n (ly_symbol2scm ("dot"),
-                       scm_make_real (p[X_AXIS]),
-                       scm_make_real (p[Y_AXIS]),
-                       scm_make_real (radius),
+                       scm_from_double (p[X_AXIS]),
+                       scm_from_double (p[Y_AXIS]),
+                       scm_from_double (radius),
                        SCM_UNDEFINED));
   Box box;
   box.add_point (p - Offset (radius, radius));
@@ -83,7 +83,7 @@ Lookup::beam (Real slope, Real width, Real thick, Real blot)
   
   SCM expr = scm_list_n (ly_symbol2scm ("polygon"),
                         ly_quote_scm (points),
-                        scm_make_real (blot),
+                        scm_from_double (blot),
                         SCM_BOOL_T,
                         SCM_UNDEFINED);
   
@@ -104,9 +104,9 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash_period, Real dash_fraction)
     }
 
   SCM at = (scm_list_n (ly_symbol2scm ("dashed-slur"),
-                       scm_make_real (thick),
-                       scm_make_real (on),
-                       scm_make_real (off),
+                       scm_from_double (thick),
+                       scm_from_double (on),
+                       scm_from_double (off),
                        ly_quote_scm (l),
                        SCM_UNDEFINED));
 
@@ -118,11 +118,11 @@ Stencil
 Lookup::horizontal_line (Interval w, Real th)
 {
   SCM at = scm_list_n (ly_symbol2scm ("draw-line"),
-                      scm_make_real (th),
-                      scm_make_real (w[LEFT]),
-                      scm_make_real (0),
-                      scm_make_real (w[RIGHT]),
-                      scm_make_real (0),
+                      scm_from_double (th),
+                      scm_from_double (w[LEFT]),
+                      scm_from_double (0),
+                      scm_from_double (w[RIGHT]),
+                      scm_from_double (0),
                       SCM_UNDEFINED);
 
   Box box;
@@ -184,11 +184,11 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
     }
 
   SCM at = (scm_list_n (ly_symbol2scm ("round-filled-box"),
-                       scm_make_real (-b[X_AXIS][LEFT]),
-                       scm_make_real (b[X_AXIS][RIGHT]),
-                       scm_make_real (-b[Y_AXIS][DOWN]),
-                       scm_make_real (b[Y_AXIS][UP]),
-                       scm_make_real (blotdiameter),
+                       scm_from_double (-b[X_AXIS][LEFT]),
+                       scm_from_double (b[X_AXIS][RIGHT]),
+                       scm_from_double (-b[Y_AXIS][DOWN]),
+                       scm_from_double (b[Y_AXIS][UP]),
+                       scm_from_double (blotdiameter),
                        SCM_UNDEFINED));
 
   return Stencil (b, at);
@@ -314,14 +314,14 @@ Lookup::round_filled_polygon (Array<Offset> const &points,
   Box box;
   for (int i = 0; i < shrunk_points.size (); i++)
     {
-      SCM x = scm_make_real (shrunk_points[i][X_AXIS]);
-      SCM y = scm_make_real (shrunk_points[i][Y_AXIS]);
+      SCM x = scm_from_double (shrunk_points[i][X_AXIS]);
+      SCM y = scm_from_double (shrunk_points[i][Y_AXIS]);
       shrunk_points_scm = scm_cons (x, scm_cons (y, shrunk_points_scm));
       box.add_point (points[i]);
     }
   SCM polygon_scm = scm_list_n (ly_symbol2scm ("polygon"),
                                ly_quote_scm (shrunk_points_scm),
-                               scm_make_real (blotdiameter),
+                               scm_from_double (blotdiameter),
                                SCM_BOOL_T,
                                SCM_UNDEFINED);
 
@@ -390,7 +390,7 @@ Lookup::slur (Bezier curve, Real curvethick, Real linethick)
 
   SCM at = (scm_list_n (ly_symbol2scm ("bezier-sandwich"),
                        ly_quote_scm (list),
-                       scm_make_real (linethick),
+                       scm_from_double (linethick),
                        SCM_UNDEFINED));
   Box b (curve.extent (X_AXIS),
         curve.extent (Y_AXIS));
@@ -442,7 +442,7 @@ Lookup::bezier_sandwich (Bezier top_curve, Bezier bottom_curve)
 
   SCM horizontal_bend = scm_list_n (ly_symbol2scm ("bezier-sandwich"),
                                    ly_quote_scm (list),
-                                   scm_make_real (0.0),
+                                   scm_from_double (0.0),
                                    SCM_UNDEFINED);
 
   Interval x_extent = top_curve.extent (X_AXIS);
@@ -671,9 +671,9 @@ Lookup::repeat_slash (Real w, Real s, Real t)
   return Lookup::round_filled_polygon (points, blotdiameter);
 #endif
   
-  SCM wid = scm_make_real (w);
-  SCM sl = scm_make_real (s);
-  SCM thick = scm_make_real (t);
+  SCM wid = scm_from_double (w);
+  SCM sl = scm_from_double (s);
+  SCM thick = scm_from_double (t);
   SCM slashnodot = scm_list_n (ly_symbol2scm ("repeat-slash"),
                               wid, sl, thick, SCM_UNDEFINED);
 
index 6d3387467cb5f61f3c57d1e30573b330c89100c1..af566aac552909e21b0c839f8a70d5fc1d15c145 100644 (file)
@@ -65,7 +65,7 @@ Lyric_engraver::process_music ()
       if (ly_is_equal (text, scm_makfrom0str (" ")))
        {
          if (last_text_)
-           last_text_->set_property ("self-alignment-X", scm_int2num (LEFT));
+           last_text_->set_property ("self-alignment-X", scm_from_int (LEFT));
        }
       else
        {
@@ -147,7 +147,7 @@ Lyric_engraver::stop_translation_timestep ()
            {
              text_->set_parent (head, X_AXIS);
              if (melisma_busy (voice))
-               text_->set_property ("self-alignment-X", scm_int2num (LEFT));
+               text_->set_property ("self-alignment-X", scm_from_int (LEFT));
            }
        }
          
index 1efd32303b8239b252de73c015080d8c1712b714..162dc08480a74a276c44206080044d55c5be5d9f 100644 (file)
@@ -726,11 +726,29 @@ parse_argv (int argc, char **argv)
     }
 }
 
+void
+setup_guile_env ()
+{
+  char * yield = getenv ("LILYPOND_GC_YIELD");
+  bool overwrite = true;
+  if (!yield)
+    {
+      yield = "70";
+      overwrite = false;
+    }
+  
+  setenv ("GUILE_MIN_YIELD_1", yield, overwrite);
+  setenv ("GUILE_MIN_YIELD_2", yield, overwrite);
+  setenv ("GUILE_MIN_YIELD_MALLOC", yield, overwrite);
+}
+
+
 int
 main (int argc, char **argv)
 {
   setup_localisation ();
   setup_paths (argv[0]);
+  setup_guile_env ();
   parse_argv (argc, argv);
   if (isatty (STDIN_FILENO))
     identify (stderr);
index 38cacdff0b3bd71c1dc4339465b057c1d676b9a6..6ece619883e79ee50763dfc5f88909023cd76253 100644 (file)
@@ -113,7 +113,7 @@ Mark_engraver::process_music ()
              int mark_count = scm_to_int (m);
              mark_count++;
              context ()->set_property ("rehearsalMark",
-                                       scm_int2num (mark_count));
+                                       scm_from_int (mark_count));
            }
 
          if (scm_is_number (m))
index 1c9f64674d0f41b2715270c13b65c881e6e7c35b..57408c22d4109ecf9b6e887d070f738d59f6de4f 100644 (file)
@@ -127,7 +127,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
                (_f ("prime interval within ligature -> skipping"));
              at_beginning = true;
              primitive->set_property ("primitive",
-                                      scm_int2num (MLP_NONE));
+                                      scm_from_int (MLP_NONE));
              continue;
            }
        }
@@ -138,7 +138,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
          nr->origin ()->warning
            (_f ("mensural ligature: duration none of Mx, L, B, S -> skipping"));
          primitive->set_property ("primitive",
-                                  scm_int2num (MLP_NONE));
+                                  scm_from_int (MLP_NONE));
          at_beginning = true;
          continue;
        }
@@ -154,7 +154,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
          if (duration_log == 0)
            {
              primitive->set_property ("primitive",
-                                      scm_int2num (MLP_UP | MLP_BREVIS));
+                                      scm_from_int (MLP_UP | MLP_BREVIS));
              prev_semibrevis = prev_brevis_shape = true;
              general_case = false;
            }
@@ -167,7 +167,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
              int left_stem = duration_log == -1 ? MLP_DOWN : 0;
 
              primitive->set_property ("primitive",
-                                      scm_int2num (left_stem | MLP_BREVIS));
+                                      scm_from_int (left_stem | MLP_BREVIS));
              prev_brevis_shape = true;
              prev_semibrevis = general_case = false;
            }
@@ -178,7 +178,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
          prev_semibrevis = false;
          if (duration_log == 0)
            {
-             primitive->set_property ("primitive", scm_int2num (MLP_BREVIS));
+             primitive->set_property ("primitive", scm_from_int (MLP_BREVIS));
              general_case = false;
            }
          else
@@ -186,7 +186,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
              nr->origin ()->warning
                (_f ("semibrevis must be followed by another one -> skipping"));
              primitive->set_property ("primitive",
-                                      scm_int2num (MLP_NONE));
+                                      scm_from_int (MLP_NONE));
              at_beginning = true;
              continue;
            }
@@ -198,7 +198,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
            (_f ("semibreves can only appear at the beginning of a ligature,\n"
                 "and there may be only zero or two of them"));
          primitive->set_property ("primitive",
-                                  scm_int2num (MLP_NONE));
+                                  scm_from_int (MLP_NONE));
          at_beginning = true;
          continue;
        }
@@ -212,11 +212,11 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
                {
                  prev_primitive->set_property
                    ("primitive",
-                    scm_int2num
+                    scm_from_int
                     (MLP_FLEXA
                      | (scm_to_int (prev_primitive->get_property ("primitive"))
                         & MLP_DOWN)));
-                 primitive->set_property ("primitive", scm_int2num (MLP_NONE));
+                 primitive->set_property ("primitive", scm_from_int (MLP_NONE));
                  break; // no more notes, no join
                }
              else
@@ -226,14 +226,14 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
                         "when the last note is a descending brevis,\n"
                         "the penultimate note must be another one,\n"
                         "or the ligatura must be LB or SSB"));
-                 primitive->set_property ("primitive", scm_int2num (MLP_NONE));
+                 primitive->set_property ("primitive", scm_from_int (MLP_NONE));
                  break;
                }
            }
          // longa
          else if (duration_log == -2)
            {
-             primitive->set_property ("primitive", scm_int2num (MLP_BREVIS));
+             primitive->set_property ("primitive", scm_from_int (MLP_BREVIS));
              general_case = false;
            }
          // else maxima; fall through regular case below
@@ -244,7 +244,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
          static int const shape[3] = {MLP_MAXIMA, MLP_LONGA, MLP_BREVIS};
 
          primitive->set_property ("primitive",
-                                  scm_int2num (shape[duration_log + 3]));
+                                  scm_from_int (shape[duration_log + 3]));
          prev_brevis_shape = duration_log == -1;
        }
 
@@ -267,7 +267,7 @@ Mensural_ligature_engraver::transform_heads (Array<Grob_info> primitives)
              //  ("noteheads.s-2mensural").extent (Y_AXIS).length ()
            }
          prev_primitive->set_property ("join-right-amount",
-                                       scm_int2num (delta_pitch));
+                                       scm_from_int (delta_pitch));
          // perhaps set add-join as well
        }
       at_beginning = false;
@@ -318,28 +318,28 @@ Mensural_ligature_engraver::propagate_properties (Spanner *ligature,
       Item *primitive = dynamic_cast<Item *> (primitives[i].grob ());
       int output = scm_to_int (primitive->get_property ("primitive"));
       primitive->set_property ("thickness",
-                              scm_make_real (thickness));
+                              scm_from_double (thickness));
 
       switch (output & MLP_ANY)
        {
        case MLP_NONE:
          primitive->set_property ("head-width",
-                                  scm_make_real (half_flexa_width));
+                                  scm_from_double (half_flexa_width));
          break;
        case MLP_BREVIS:
        case MLP_LONGA:
          primitive->set_property ("head-width",
-                                  scm_make_real (head_width));
+                                  scm_from_double (head_width));
          break;
        case MLP_MAXIMA:
          primitive->set_property ("head-width",
-                                  scm_make_real (maxima_head_width));
+                                  scm_from_double (maxima_head_width));
          break;
        case MLP_FLEXA:
          primitive->set_property ("head-width",
-                                  scm_make_real (half_flexa_width));
+                                  scm_from_double (half_flexa_width));
          primitive->set_property ("flexa-width",
-                                  scm_make_real (flexa_width));
+                                  scm_from_double (flexa_width));
          break;
        default:
          programming_error (_f ("unexpected case fall-through"));
index 3218a0ae8beb3d1ee2319c5d2932da03d2024a2d..3001ed89f7023bac38f47f6473e21d0e99a6ed34 100644 (file)
@@ -25,7 +25,7 @@ Modified_font_metric::Modified_font_metric (Font_metric *fm,
   Real total_mag = magnification * scm_to_double (scm_cdr (desc));
   assert (total_mag);
 
-  description_ = scm_cons (scm_car (desc), scm_make_real (total_mag));
+  description_ = scm_cons (scm_car (desc), scm_from_double (total_mag));
   orig_ = fm;
 }
 
index 3f86c6c6ca7b3304d4b07813c82734b7f30c0471..2f30318f6cc9b92a39b64852af4e70430fe91fba 100644 (file)
@@ -113,7 +113,7 @@ Multi_measure_rest_engraver::process_music ()
              Grob *last = 0;
              for (int i = 0; i < numbers_.size (); i++)
                {
-                 if (scm_int2num (d) == numbers_[i]->get_property ("direction"))
+                 if (scm_from_int (d) == numbers_[i]->get_property ("direction"))
                    {
                      if (last)
                        Side_position_interface::add_support (numbers_[i], last);
@@ -207,7 +207,7 @@ Multi_measure_rest_engraver::start_translation_timestep ()
        We can't plug a markup directly into the grob, since the
        measure-count determines the formatting of the mmrest.
       */
-      last_rest_->set_property ("measure-count", scm_int2num (num));
+      last_rest_->set_property ("measure-count", scm_from_int (num));
 
       SCM sml = get_property ("measureLength");
       Rational ml = (unsmob_moment (sml)) ? unsmob_moment (sml)->main_part_ : Rational (1);
@@ -232,7 +232,7 @@ Multi_measure_rest_engraver::start_translation_timestep ()
          else
            {
              SCM text
-               = scm_number_to_string (scm_int2num (num), scm_from_int (10));
+               = scm_number_to_string (scm_from_int (num), scm_from_int (10));
              last->set_property ("text", text);
            }
        }
index f898ba8f6ab53107241c5619ab13365411cddc77..417b3819bede5e6b393c6ac57acacc8b0446023e 100644 (file)
@@ -208,10 +208,10 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
 
          orig = orig.transposed (*p);
 
-         SCM key = scm_cons (scm_int2num (orig.get_octave ()),
-                             scm_int2num (orig.get_notename ()));
+         SCM key = scm_cons (scm_from_int (orig.get_octave ()),
+                             scm_from_int (orig.get_notename ()));
 
-         newlist = scm_cons (scm_cons (key, scm_int2num (orig.get_alteration ())),
+         newlist = scm_cons (scm_cons (key, scm_from_int (orig.get_alteration ())),
                              newlist);
        }
       else if (scm_is_number (key))
@@ -219,8 +219,8 @@ LY_DEFINE (ly_transpose_key_alist, "ly:transpose-key-alist",
          Pitch orig (0, scm_to_int (key), scm_to_int (alter));
          orig = orig.transposed (*p);
 
-         key = scm_int2num (orig.get_notename ());
-         alter = scm_int2num (orig.get_alteration ());
+         key = scm_from_int (orig.get_notename ());
+         alter = scm_from_int (orig.get_alteration ());
          newlist = scm_cons (scm_cons (key, alter), newlist);
        }
     }
index bdf90db4cede0991f4e59e7f6c5714aa904fe972..00a28697eab1035a0095815df36366f9b9c42f24 100644 (file)
@@ -159,7 +159,7 @@ New_fingering_engraver::add_fingering (Grob *head,
       */
       event->origin ()->warning (_ ("music for the martians."));
     }
-  SCM sstr = scm_number_to_string (scm_int2num (d), scm_int2num (10));
+  SCM sstr = scm_number_to_string (scm_from_int (d), scm_from_int (10));
   ft.script_->set_property ("text", sstr);
 
   ft.finger_event_ = event;
@@ -183,7 +183,7 @@ New_fingering_engraver::add_string (Grob *head,
 
   int d = scm_to_int (event->get_property ("string-number"));
 
-  SCM sstr = scm_number_to_string (scm_int2num (d), scm_int2num (10));
+  SCM sstr = scm_number_to_string (scm_from_int (d), scm_from_int (10));
   ft.script_->set_property ("text", sstr);
 
   ft.finger_event_ = event;
@@ -282,7 +282,7 @@ New_fingering_engraver::position_scripts (SCM orientations,
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, Y_AXIS);
       f->add_offset_callback (Side_position_interface::aligned_side_proc, X_AXIS);
 
-      f->set_property ("direction", scm_int2num (hordir));
+      f->set_property ("direction", scm_from_int (hordir));
     }
 
   int finger_prio = 200;
@@ -292,12 +292,12 @@ New_fingering_engraver::position_scripts (SCM orientations,
       Grob *f = ft.script_;
       f->set_parent (ft.head_, X_AXIS);
       f->set_property ("script-priority",
-                      scm_int2num (finger_prio + ft.position_));
+                      scm_from_int (finger_prio + ft.position_));
       f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS);
       f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS);
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS);
 
-      f->set_property ("direction", scm_int2num (UP));
+      f->set_property ("direction", scm_from_int (UP));
     }
 
   for (int i = 0; i < down.size (); i++)
@@ -306,12 +306,12 @@ New_fingering_engraver::position_scripts (SCM orientations,
       Grob *f = ft.script_;
       f->set_parent (ft.head_, X_AXIS);
       f->set_property ("script-priority",
-                      scm_int2num (finger_prio + down.size () - ft.position_));
+                      scm_from_int (finger_prio + down.size () - ft.position_));
 
       f->add_offset_callback (Self_alignment_interface::centered_on_parent_proc, X_AXIS);
       f->add_offset_callback (Self_alignment_interface::aligned_on_self_proc, X_AXIS);
       f->add_offset_callback (Side_position_interface::aligned_side_proc, Y_AXIS);
-      f->set_property ("direction", scm_int2num (DOWN));
+      f->set_property ("direction", scm_from_int (DOWN));
     }
 }
 
index e1af7de632700f64506ad69ac3ffdd91df0e3920..8dab14f3daca935443150e56bb1413e17137c789 100644 (file)
@@ -38,7 +38,7 @@ Note_collision_interface::force_shift_callback (SCM element_smob, SCM axis)
       do_shifts (me);
     }
 
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 void
@@ -456,7 +456,7 @@ Note_collision_interface::automatic_shift (Grob *me,
     {
       for (int i = 0; i < clash_groups[d].size (); i++)
        tups = scm_cons (scm_cons (clash_groups[d][i]->self_scm (),
-                                  scm_make_real (offsets[d][i])),
+                                  scm_from_double (offsets[d][i])),
                         tups);
     }
   while (flip (&d) != UP);
index 025207991460f21734ec16b93f55e0aa1dc7be33..bd31553a3e0981c42b9febcba4b40ce0300b8d03 100644 (file)
@@ -38,7 +38,7 @@ internal_print (Grob *me, String *font_char)
       style = ly_symbol2scm ("default");
     }
 
-  SCM log = scm_int2num (Note_head::get_balltype (me));
+  SCM log = scm_from_int (Note_head::get_balltype (me));
   String suffix =  to_string (min (robust_scm2int (me->get_property ("duration-log"), 2), 2));
   if (style != ly_symbol2scm ("default"))
     {
@@ -115,7 +115,7 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
   if (!ly_is_procedure (v))
     return 0.0;
 
-  SCM result = scm_call_2 (v, me->self_scm (), scm_int2num (a));
+  SCM result = scm_call_2 (v, me->self_scm (), scm_from_int (a));
   if (!scm_is_pair (result))
     return 0.0;
 
index 05345c0aaff949970a883c38cdb9a58d786fc6f1..0bff1e7d11ecd89460388eab8b9a36106a4bbfd2 100644 (file)
@@ -60,7 +60,7 @@ Note_heads_engraver::process_music ()
 
       Duration dur = *unsmob_duration (ev->get_property ("duration"));
 
-      note->set_property ("duration-log", scm_int2num (dur.duration_log ()));
+      note->set_property ("duration-log", scm_from_int (dur.duration_log ()));
       if (dur.dot_count ())
        {
          Item *d = make_item ("Dots", note->self_scm ());
@@ -68,7 +68,7 @@ Note_heads_engraver::process_music ()
 
          if (dur.dot_count ()
              != robust_scm2int (d->get_property ("dot-count"), 0))
-           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+           d->set_property ("dot-count", scm_from_int (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
 
@@ -92,7 +92,7 @@ Note_heads_engraver::process_music ()
       if (scm_is_number (c0))
        pos += scm_to_int (c0);
 
-      note->set_property ("staff-position", scm_int2num (pos));
+      note->set_property ("staff-position", scm_from_int (pos));
 
       /*
        Shaped note heads change on step of the scale.
index 30fcbb75cb155e1ebd9eb9c52b648bc30e6b9fdb..76c65015976824d35cb17f6975245d5b446893ac 100644 (file)
@@ -61,7 +61,7 @@ Ottava_spanner_engraver::process_music ()
          SCM c0 (get_property ("middleCPosition"));
          SCM oc0 (get_property ("originalCentralCPosition"));
          if (scm_less_p (oc0, c0) == SCM_BOOL_T)
-           span_->set_property ("direction", scm_int2num (DOWN));
+           span_->set_property ("direction", scm_from_int (DOWN));
        }
     }
   last_ottavation_ = ott;
index 6e3af7194f8600658dd3f54e8ebf2633914ac101..f389fcf3e641a7f8dc51a1df4fdb786f6eef2bad 100644 (file)
@@ -96,7 +96,7 @@ LY_DEFINE (ly_paper_outputscale, "ly:paper-outputscale",
 {
   Output_def *b = unsmob_output_def (bp);
   SCM_ASSERT_TYPE (b, bp, SCM_ARG1, __FUNCTION__, "paper");
-  return scm_make_real (output_scale (b));
+  return scm_from_double (output_scale (b));
 }
 
 LY_DEFINE (ly_make_output_def, "ly:make-output-def",
@@ -130,7 +130,7 @@ LY_DEFINE (ly_paper_get_number, "ly:paper-get-number", 2, 0, 0,
   Output_def *layout = unsmob_output_def (layout_smob);
   SCM_ASSERT_TYPE (layout, layout_smob, SCM_ARG1,
                   __FUNCTION__, "layout definition");
-  return scm_make_real (layout->get_dimension (name));
+  return scm_from_double (layout->get_dimension (name));
 }
 
 LY_DEFINE (ly_paper_fonts, "ly:paper-fonts",
index 230220a31f52a6dc0e5391995ec6bbc1d8679227..a7dcf412a052a4ebda4fe5dc0e9a7664ec52d830 100644 (file)
@@ -142,7 +142,7 @@ Paper_column_engraver::process_music ()
       if (scm_is_number (mpen))
        total_penalty += scm_to_double (mpen);
 
-      command_column_->set_property ("penalty", scm_make_real (total_penalty));
+      command_column_->set_property ("penalty", scm_from_double (total_penalty));
 
       /* ugh.  arbitrary, hardcoded */
       if (total_penalty > 10000.0)
@@ -154,7 +154,7 @@ Paper_column_engraver::process_music ()
       if (scm_is_number (mpage_pen))
        total_pp += scm_to_double (mpage_pen);
 
-      command_column_->set_property ("page-penalty", scm_make_real (total_pp));
+      command_column_->set_property ("page-penalty", scm_from_double (total_pp));
     }
 
 
index 0ef9ddbb11a1499fcaabaa2863f969720f1d566b..6b7a1917a7b515dbf018ee1a0cc6f477ab544097 100644 (file)
@@ -53,13 +53,13 @@ find_scaled_font (Output_def *mod, Font_metric *f, Real m)
 
   SCM font_table = get_font_table (mod);
   SCM sizes = scm_hashq_ref (font_table, f->self_scm (), SCM_EOL);
-  SCM handle = scm_assoc (scm_make_real (lookup_mag), sizes);
+  SCM handle = scm_assoc (scm_from_double (lookup_mag), sizes);
   if (scm_is_pair (handle))
     return unsmob_metrics (scm_cdr (handle));
 
   SCM val = Modified_font_metric::make_scaled_font_metric (f, lookup_mag);
 
-  sizes = scm_acons (scm_make_real (lookup_mag), val, sizes);
+  sizes = scm_acons (scm_from_double (lookup_mag), val, sizes);
   unsmob_metrics (val)->unprotect ();
   scm_hashq_set_x (font_table, f->self_scm (), sizes);
   return unsmob_metrics (val);
index e6da5d276b25caec42c147dcf4dc265c349d1880..760999b3ebfc2082e61b45365cfa7e35d247471c 100644 (file)
@@ -34,7 +34,7 @@ LY_DEFINE (ly_paper_system_number, "ly:paper-system-number",
 {
   Paper_system *ps = unsmob_paper_system (system);
   SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
-  return scm_int2num (ps->number_);
+  return scm_from_int (ps->number_);
 }
 
 LY_DEFINE (ly_paper_system_break_before_penalty, "ly:paper-system-break-before-penalty",
@@ -43,7 +43,7 @@ LY_DEFINE (ly_paper_system_break_before_penalty, "ly:paper-system-break-before-p
 {
   Paper_system *ps = unsmob_paper_system (system);
   SCM_ASSERT_TYPE (ps, system, SCM_ARG1, __FUNCTION__, "paper-system");
-  return scm_int2num (int (ps->break_before_penalty ()));
+  return scm_from_int (int (ps->break_before_penalty ()));
 }
 
 LY_DEFINE (ly_paper_system_stencil, "ly:paper-system-stencil",
index d7c87327f81b768a8726c25daef2aff0f8d3d259..511351e137a1647eaea91f8b04cf2a4ed1b866f0 100644 (file)
@@ -701,7 +701,7 @@ identifier_init:
                $$ = $1;
        }
        | DIGIT {
-               $$ = scm_int2num ($1);
+               $$ = scm_from_int ($1);
        }
        ;
 
@@ -911,7 +911,7 @@ tempo_event:
        TEMPO steno_duration '=' bare_unsigned  {
                $$ = MY_MAKE_MUSIC ("MetronomeChangeEvent");
                $$->set_property ("tempo-unit", $2);
-               $$->set_property ("metronome-count", scm_int2num ( $4));
+               $$->set_property ("metronome-count", scm_from_int ( $4));
        }
        ;
 
@@ -996,7 +996,7 @@ Repeated_music:
                        r-> set_property ("element", beg->self_scm ());
                        beg->unprotect ();
                        }
-               r->set_property ("repeat-count", scm_int2num (max (times, 1)));
+               r->set_property ("repeat-count", scm_from_int (max (times, 1)));
 
                r-> set_property ("elements",alts);
                if (ly_is_equal ($2, scm_makfrom0str ("tremolo"))) {
@@ -1021,7 +1021,7 @@ Repeated_music:
                                shift -= 1;
                                r->compress (Moment (Rational (1, list_len)));
                        }
-                       scm_call_3 (func, r->self_scm (), scm_int2num (shift), scm_int2num (dots));
+                       scm_call_3 (func, r->self_scm (), scm_from_int (shift), scm_from_int (dots));
 
                }
                r->set_spot (*$4->origin ());
@@ -1207,8 +1207,8 @@ Prefix_composite_music:
 
                $$->set_property ("element", mp->self_scm ());
                mp->unprotect();
-               $$->set_property ("numerator", scm_int2num (n));
-               $$->set_property ("denominator", scm_int2num (d));
+               $$->set_property ("numerator", scm_from_int (n));
+               $$->set_property ("denominator", scm_from_int (d));
                $$->compress (Moment (Rational (n,d)));
 
        }
@@ -1531,7 +1531,7 @@ scalar: string {
                $$ = $1;
        }
        | DIGIT {
-               $$ = scm_int2num ($1);
+               $$ = scm_from_int ($1);
        }
        ;
 
@@ -1646,7 +1646,7 @@ chord_body_element:
                if (scm_is_number (check))
                {
                        int q = scm_to_int (check);
-                       n->set_property ("absolute-octave", scm_int2num (q-1));
+                       n->set_property ("absolute-octave", scm_from_int (q-1));
                }
 
                
@@ -1698,7 +1698,7 @@ command_element:
        }
        | E_BRACKET_OPEN {
                Music *m = MY_MAKE_MUSIC ("LigatureEvent");
-               m->set_property ("span-direction", scm_int2num (START));
+               m->set_property ("span-direction", scm_from_int (START));
                m->set_spot (@$);
 
                $$ = MY_MAKE_MUSIC ("EventChord");
@@ -1708,7 +1708,7 @@ command_element:
        }
        | E_BRACKET_CLOSE {
                Music *m = MY_MAKE_MUSIC ("LigatureEvent");
-               m->set_property ("span-direction", scm_int2num (STOP));
+               m->set_property ("span-direction", scm_from_int (STOP));
                m->set_spot (@$);
 
                $$ = MY_MAKE_MUSIC ("EventChord");
@@ -1855,12 +1855,12 @@ post_event:
        }
        | script_dir direction_reqd_event {
                if ($1)
-                       $2->set_property ("direction", scm_int2num ($1));
+                       $2->set_property ("direction", scm_from_int ($1));
                $$ = $2;
        }
        | script_dir direction_less_event {
                if ($1)
-                       $2->set_property ("direction", scm_int2num ($1));
+                       $2->set_property ("direction", scm_from_int ($1));
                $$ = $2;
        }
        | string_number_event
@@ -1869,7 +1869,7 @@ post_event:
 string_number_event:
        E_UNSIGNED {
                Music *s = MY_MAKE_MUSIC ("StringNumberEvent");
-               s->set_property ("string-number", scm_int2num ($1));
+               s->set_property ("string-number", scm_from_int ($1));
                s->set_spot (@$);
                $$ = s;
        }
@@ -1929,7 +1929,7 @@ direction_less_event:
        | tremolo_type  {
                Music *a = MY_MAKE_MUSIC ("TremoloEvent");
                a->set_spot (@$);
-               a->set_property ("tremolo-type", scm_int2num ($1));
+               a->set_property ("tremolo-type", scm_from_int ($1));
                $$ = a;
         }
        ;       
@@ -1950,9 +1950,9 @@ direction_reqd_event:
 
 octave_check:
        /**/ { $$ = SCM_EOL; }
-       | '='  { $$ = scm_int2num (0); }
-       | '=' sub_quotes { $$ = scm_int2num ($2); }
-       | '=' sup_quotes { $$ = scm_int2num ($2); }
+       | '='  { $$ = scm_from_int (0); }
+       | '=' sub_quotes { $$ = scm_from_int ($2); }
+       | '=' sup_quotes { $$ = scm_from_int ($2); }
        ;
 
 sup_quotes:
@@ -2038,7 +2038,7 @@ gen_text_def:
        }
        | DIGIT {
                Music *t = MY_MAKE_MUSIC ("FingerEvent");
-               t->set_property ("digit", scm_int2num ($1));
+               t->set_property ("digit", scm_from_int ($1));
                t->set_spot (@$);
                $$ = t;
        }
@@ -2133,7 +2133,7 @@ multiplied_duration:
 fraction:
        FRACTION { $$ = $1; }
        | UNSIGNED '/' UNSIGNED {
-               $$ = scm_cons (scm_int2num ($1), scm_int2num ($3));
+               $$ = scm_cons (scm_from_int ($1), scm_from_int ($3));
        }
        ;
 
@@ -2159,12 +2159,12 @@ tremolo_type:
 
 bass_number:
        DIGIT   {
-               $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
+               $$ = scm_number_to_string (scm_from_int ($1), scm_from_int (10));
                $$ = scm_list_2 (ly_lily_module_constant ("number-markup"),
                                $$);
        }
        | UNSIGNED {
-               $$ = scm_number_to_string (scm_int2num ($1), scm_int2num (10));
+               $$ = scm_number_to_string (scm_from_int ($1), scm_from_int (10));
                $$ = scm_list_2 (ly_lily_module_constant ("number-markup"),
                                $$);
        }
@@ -2197,9 +2197,9 @@ bass_figure:
                        SCM salter = m->get_property ("alteration");
                        int alter = scm_is_number (salter) ? scm_to_int (salter) : 0;
                        m->set_property ("alteration",
-                               scm_int2num (alter + $2));
+                               scm_from_int (alter + $2));
                } else {
-                       m->set_property ("alteration", scm_int2num (0));
+                       m->set_property ("alteration", scm_from_int (0));
                }
        }
        ;
@@ -2259,7 +2259,7 @@ simple_element:
                if (scm_is_number ($4))
                {
                        int q = scm_to_int ($4);
-                       n->set_property ("absolute-octave", scm_int2num (q-1));
+                       n->set_property ("absolute-octave", scm_from_int (q-1));
                }
 
                if ($3 % 2)
@@ -2456,7 +2456,7 @@ number_factor:
 
 bare_number:
        UNSIGNED        {
-               $$ = scm_int2num ($1);
+               $$ = scm_from_int ($1);
        }
        | REAL          {
                $$ = $1;
@@ -2465,10 +2465,10 @@ bare_number:
                $$ = $1;
        }
        | REAL NUMBER_IDENTIFIER        {
-               $$ = scm_make_real (scm_to_double ($1) *scm_to_double ($2));
+               $$ = scm_from_double (scm_to_double ($1) *scm_to_double ($2));
        }
        | UNSIGNED NUMBER_IDENTIFIER    {
-               $$ = scm_make_real ($1 *scm_to_double ($2));
+               $$ = scm_from_double ($1 *scm_to_double ($2));
        }
        ;
 
index 577552579fb3ac4ae04e144bff1936de248e8d13..65b4fe6c3a652fc1d0b03d2046c2805ddf026561 100644 (file)
@@ -373,10 +373,10 @@ Part_combine_iterator::construct_children ()
     {
       SCM sym = ly_symbol2scm (*p);
       execute_pushpop_property (one, sym,
-                               ly_symbol2scm ("direction"), scm_int2num (1));
+                               ly_symbol2scm ("direction"), scm_from_int (1));
 
       execute_pushpop_property (two, sym,
-                               ly_symbol2scm ("direction"), scm_int2num (-1));
+                               ly_symbol2scm ("direction"), scm_from_int (-1));
     }
 }
 
index ec465552473aeb25fec30785b4fb619b2c899fae..1df61de8fb13cba934cf659ded971b40c0b78f51 100644 (file)
@@ -322,7 +322,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
        {
          SCM flare = p->bracket_->get_property ("bracket-flare");
          p->bracket_->set_property ("bracket-flare", scm_cons (scm_car (flare),
-                                                               scm_make_real (0)));
+                                                               scm_from_double (0)));
        }
 
       p->finished_bracket_ = p->bracket_;
@@ -345,7 +345,7 @@ Piano_pedal_engraver::create_bracket_grobs (Pedal_info *p, bool mixed)
       if (!p->finished_bracket_)
        {
          SCM flare = p->bracket_->get_property ("bracket-flare");
-         p->bracket_->set_property ("bracket-flare", scm_cons (scm_make_real (0), scm_cdr (flare)));
+         p->bracket_->set_property ("bracket-flare", scm_cons (scm_from_double (0), scm_cdr (flare)));
        }
 
       /* Set this property for 'mixed style' pedals,    Ped._______/\ ,
index 18f3a6730755ef7453a4769161b5be04246a393f..fe923bc9546f0d7caaa12979117c0bb8bf75fbbe 100644 (file)
@@ -44,7 +44,7 @@ LY_DEFINE (ly_pitch_steps, "ly:pitch-steps", 1, 0, 0,
 {
   Pitch *pp = unsmob_pitch (p);
   SCM_ASSERT_TYPE (pp, p, SCM_ARG1, __FUNCTION__, "Pitch");
-  return scm_int2num (pp->steps ());
+  return scm_from_int (pp->steps ());
 }
 
 LY_DEFINE (ly_pitch_octave, "ly:pitch-octave",
@@ -54,7 +54,7 @@ LY_DEFINE (ly_pitch_octave, "ly:pitch-octave",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_octave ();
-  return scm_int2num (q);
+  return scm_from_int (q);
 }
 
 LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
@@ -65,7 +65,7 @@ LY_DEFINE (ly_pitch_alteration, "ly:pitch-alteration",
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_alteration ();
 
-  return scm_int2num (q);
+  return scm_from_int (q);
 }
 
 LY_DEFINE (pitch_notename, "ly:pitch-notename",
@@ -75,7 +75,7 @@ LY_DEFINE (pitch_notename, "ly:pitch-notename",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->get_notename ();
-  return scm_int2num (q);
+  return scm_from_int (q);
 }
 
 LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
@@ -85,7 +85,7 @@ LY_DEFINE (ly_pitch_quartertones, "ly:pitch-quartertones",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->quartertone_pitch ();
-  return scm_int2num (q);
+  return scm_from_int (q);
 }
 
 LY_DEFINE (ly_pitch_semitones, "ly:pitch-semitones",
@@ -95,7 +95,7 @@ LY_DEFINE (ly_pitch_semitones, "ly:pitch-semitones",
   Pitch *p = unsmob_pitch (pp);
   SCM_ASSERT_TYPE (p, pp, SCM_ARG1, __FUNCTION__, "Pitch");
   int q = p->semitone_pitch ();
-  return scm_int2num (q);
+  return scm_from_int (q);
 }
 
 LY_DEFINE (ly_pitch_less_p, "ly:pitch<?",
index 27b66f0ce799e1425107e2150f941659c5a460d0..6d98ede4d770d21de923b326d48749e14c694906 100644 (file)
@@ -83,8 +83,8 @@ Pitched_trill_engraver::make_trill (Music *mus)
 
   SCM keysig = get_property ("localKeySignature");
 
-  SCM key = scm_cons (scm_int2num (p->get_octave ()),
-                     scm_int2num (p->get_notename ()));
+  SCM key = scm_cons (scm_from_int (p->get_octave ()),
+                     scm_from_int (p->get_notename ()));
 
   SCM handle = scm_assoc (key, keysig);
   bool print_acc =
index 78f55a46f84a7f85e3fab5efc9667384a4fe645d..3e1da1936a97543b3a28d9e4bafe0e43c72ca67a 100644 (file)
@@ -39,7 +39,7 @@ Rest_collision::force_shift_callback (SCM element_smob, SCM axis)
          do_shift (rc);
        }
     }
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 MAKE_SCHEME_CALLBACK (Rest_collision, force_shift_callback_rest, 2);
@@ -53,7 +53,7 @@ Rest_collision::force_shift_callback_rest (SCM rest, SCM axis)
   if (Note_column::has_interface (parent))
     return force_shift_callback (parent->self_scm (), axis);
   else
-    return scm_make_real (0.0);
+    return scm_from_double (0.0);
 }
 
 void
index 6d9c20a5bef45ca5df66d49330d56d389c0e462e..9409c383395939a2c870f73b392f01f9d4d232c0 100644 (file)
@@ -59,7 +59,7 @@ Rest_engraver::process_music ()
       int durlog = unsmob_duration (rest_event_->get_property ("duration"))->duration_log ();
 
       rest_->set_property ("duration-log",
-                          scm_int2num (durlog));
+                          scm_from_int (durlog));
 
       int dots = unsmob_duration (rest_event_->get_property ("duration"))->dot_count ();
 
@@ -69,7 +69,7 @@ Rest_engraver::process_music ()
 
          Rhythmic_head::set_dots (rest_, dot_);
          dot_->set_parent (rest_, Y_AXIS);
-         dot_->set_property ("dot-count", scm_int2num (dots));
+         dot_->set_property ("dot-count", scm_from_int (dots));
        }
 
       Pitch *p = unsmob_pitch (rest_event_->get_property ("pitch"));
@@ -85,7 +85,7 @@ Rest_engraver::process_music ()
          if (scm_is_number (c0))
            pos += scm_to_int (c0);
 
-         rest_->set_property ("staff-position", scm_int2num (pos));
+         rest_->set_property ("staff-position", scm_from_int (pos));
        }
     }
 }
index d9c16d732767a557e6dbd866f7daf9942abd6921..fa9fdb166070cf8cca38f04c07608bd0f1854056 100644 (file)
@@ -41,12 +41,12 @@ Rest::after_line_breaking (SCM smob)
   if (d && bt > 4) // UGH.
     {
       d->set_property ("staff-position",
-                      scm_int2num ((bt == 7) ? 4 : 3));
+                      scm_from_int ((bt == 7) ? 4 : 3));
     }
   if (d && bt >= -1 && bt <= 1) // UGH again.
     {
       d->set_property ("staff-position",
-                      scm_int2num ((bt == 0) ? -1 : 1));
+                      scm_from_int ((bt == 0) ? -1 : 1));
     }
   return SCM_UNSPECIFIED;
 }
@@ -175,14 +175,14 @@ Rest::polyphonic_offset_callback (SCM smob, SCM)
 {
   Grob *me = unsmob_grob (smob);
   if (scm_is_number (me->get_property ("staff-position")))
-    return scm_make_real (0);
+    return scm_from_double (0);
 
   Direction d = get_grob_direction (me);
   Real off = 2 * d;
   if (off)
     off *= Staff_symbol_referencer::staff_space (me);
 
-  return scm_make_real (off);
+  return scm_from_double (off);
 }
 
 ADD_INTERFACE (Rest, "rest-interface",
index 86af9a6d030bf7a95e7718991db58597bd37e836..91a4795bf875668adc8dedda23be14e446e0c143 100644 (file)
@@ -35,7 +35,7 @@ Scheme_hash_table::Scheme_hash_table ()
 {
   hash_tab_ = SCM_EOL;
   smobify_self ();
-  hash_tab_ = scm_make_vector (scm_int2num (119), SCM_EOL);
+  hash_tab_ = scm_make_vector (scm_from_int (119), SCM_EOL);
   elt_count_ = 0;
 }
 
@@ -46,7 +46,7 @@ Scheme_hash_table::Scheme_hash_table (Scheme_hash_table const &src)
   elt_count_ = 0;
   smobify_self ();
 
-  hash_tab_ = scm_make_vector (scm_int2num (max ((int) src.elt_count_, 11)), SCM_EOL);
+  hash_tab_ = scm_make_vector (scm_from_int (max ((int) src.elt_count_, 11)), SCM_EOL);
   elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
@@ -56,7 +56,7 @@ Scheme_hash_table::operator = (Scheme_hash_table const &src)
   if (&src == this)
     return;
 
-  hash_tab_ = scm_make_vector (scm_int2num (max ((int) src.elt_count_, 11)), SCM_EOL);
+  hash_tab_ = scm_make_vector (scm_from_int (max ((int) src.elt_count_, 11)), SCM_EOL);
   elt_count_ = copy_scm_hashes (hash_tab_, src.hash_tab_);
 }
 
@@ -117,7 +117,7 @@ Scheme_hash_table::set (SCM k, SCM v)
   */
   if (elt_count_ > 2 * scm_c_vector_length (hash_tab_))
     {
-      SCM nh = scm_make_vector (scm_int2num (3 * elt_count_ + 1), SCM_EOL);
+      SCM nh = scm_make_vector (scm_from_int (3 * elt_count_ + 1), SCM_EOL);
       elt_count_ = copy_scm_hashes (nh, hash_tab_);
       hash_tab_ = nh;
     }
@@ -146,7 +146,7 @@ Scheme_hash_table::to_alist () const
 {
   SCM lst = SCM_EOL;
   for (int i = scm_c_vector_length (hash_tab_); i--;)
-    for (SCM s = scm_vector_ref (hash_tab_, scm_int2num (i)); scm_is_pair (s);
+    for (SCM s = scm_vector_ref (hash_tab_, scm_from_int (i)); scm_is_pair (s);
         s = scm_cdr (s))
       lst = scm_acons (scm_caar (s), scm_cdar (s), lst);
   return lst;
index 71cfd4119acb640810be6773e8d545f9f8ec9b15..e2e7411b536b5c4cd55021167068cc40caf35ece 100644 (file)
@@ -66,7 +66,7 @@ Script_column::before_line_breaking (SCM smob)
        {
          programming_error ("no direction for script");
          d = DOWN;
-         g->set_property ("direction", scm_int2num (d));
+         g->set_property ("direction", scm_from_int (d));
        }
 
       scripts_drul[d] = scm_cons (g->self_scm (), scripts_drul[d]);
index 7505792801485d1d7b51f75f504a9fdc538315a3..da86b9c1725b05525c7425a6af0a891a56e5350a 100644 (file)
@@ -133,7 +133,7 @@ void make_script_from_event (Grob *p, bool *follow, Context *tg,
             to the head.  */
          int prio = scm_to_int (val) + index;
 
-         val = scm_int2num (prio);
+         val = scm_from_int (prio);
        }
       if (p->internal_get_property (sym) == SCM_EOL)
        p->internal_set_property (sym, val);
@@ -142,7 +142,7 @@ void make_script_from_event (Grob *p, bool *follow, Context *tg,
   if (!priority_found)
     {
       p->set_property ("script-priority",
-                      scm_int2num (index));
+                      scm_from_int (index));
     }
 
   Side_position_interface::set_axis (p, Y_AXIS);
index 9da0a406c212007d5250295df81a0dbd5af578d8..c3ef66b54f535923ab26d1a379a02779e33ef58f 100644 (file)
@@ -20,7 +20,7 @@ Self_alignment_interface::centered_on_parent (SCM element_smob, SCM axis)
   Grob *him = me->get_parent (a);
   Interval he = him->extent (him, a);
 
-  return scm_make_real (he.is_empty () ? 0.0 : he.center ());
+  return scm_from_double (he.is_empty () ? 0.0 : he.center ());
 }
 
 MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_parent, 2);
@@ -37,7 +37,7 @@ Self_alignment_interface::aligned_on_parent (SCM element_smob, SCM axis)
   SCM align_prop (me->internal_get_property (sym));
 
   if (!scm_is_number (align_prop))
-    return scm_int2num (0);
+    return scm_from_int (0);
 
   Real x = 0.0;
   Real align = scm_to_double (align_prop);
@@ -51,7 +51,7 @@ Self_alignment_interface::aligned_on_parent (SCM element_smob, SCM axis)
   if (!he.is_empty ())
     x += he.linear_combination (align);
 
-  return scm_make_real (x);
+  return scm_from_double (x);
 }
 
 /* Position centered on parent. */
@@ -65,7 +65,7 @@ Self_alignment_interface::centered_on_other_axis_parent (SCM element_smob,
   Grob *him = me->get_parent (other_axis (a));
   Interval he = him->extent (him, a);
 
-  return scm_make_real (he.is_empty () ? 0.0 : he.center ());
+  return scm_from_double (he.is_empty () ? 0.0 : he.center ());
 }
 
 /** callback that centers the element on itself
@@ -87,9 +87,9 @@ Self_alignment_interface::aligned_on_self (SCM element_smob, SCM axis)
       if (ext.is_empty ())
        programming_error ("can't align on self: empty element");
       else
-       return scm_make_real (- ext.linear_combination (scm_to_double (align)));
+       return scm_from_double (- ext.linear_combination (scm_to_double (align)));
     }
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 ADD_INTERFACE (Self_alignment_interface, "self-alignment-interface",
index fcdb0daf198b17e563bedfb915ad3605dc90a08f..e6821a3bd9f8e0e6bb8435b268b44871044ee2a8 100644 (file)
@@ -125,7 +125,7 @@ Side_position_interface::general_side_position (Grob *me, Axis a, bool use_exten
 
       programming_error (msg);
     }
-  return scm_make_real (total_off);
+  return scm_from_double (total_off);
 }
 
 /*
@@ -184,9 +184,9 @@ Side_position_interface::quantised_position (SCM element_smob, SCM)
          rp += d;
        }
 
-      return scm_make_real ((rp - p) * Staff_symbol_referencer::staff_space (me) / 2.0);
+      return scm_from_double ((rp - p) * Staff_symbol_referencer::staff_space (me) / 2.0);
     }
-  return scm_make_real (0.0);
+  return scm_from_double (0.0);
 }
 
 /*
@@ -235,7 +235,7 @@ Side_position_interface::aligned_side (SCM element_smob, SCM axis)
       o += d * max (diff, 0.0);
     }
 
-  return scm_make_real (o);
+  return scm_from_double (o);
 }
 
 void
index d218a54d19a755c84b5c426e7666c8a0ea6980c9..469b8414c059a55846d57e34f590b4b8f5274d7d 100644 (file)
@@ -193,7 +193,7 @@ Slur::outside_slur_callback (SCM grob, SCM axis)
        }
     }
 
-  return scm_make_real (offset);
+  return scm_from_double (offset);
 }
 
 static Direction
index 3f6b9daa776375b450e375fb8e7c63aee8741c08..a36fe3c175adfb905d657a3dc8df984ac5c7341c 100644 (file)
@@ -36,7 +36,7 @@ Spaceable_grob::add_rod (Grob *me, Grob *p, Real d)
     programming_error ("infinite rod");
 
   SCM mins = get_minimum_distances (me);
-  SCM newdist = scm_make_real (d);
+  SCM newdist = scm_from_double (d);
   for (SCM s = mins; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM dist = scm_car (s);
index ae50a097f525ff86ec94a3567e6914e90397a09e..95bd6ae56ea15b68ccaded2910940ca914fa0809 100644 (file)
@@ -159,10 +159,10 @@ Span_bar::center_on_spanned_callback (SCM element_smob, SCM axis)
   if (i.is_empty ())
     {
       me->suicide ();
-      return scm_make_real (0.0);
+      return scm_from_double (0.0);
     }
 
-  return scm_make_real (i.center ());
+  return scm_from_double (i.center ());
 }
 
 void
@@ -224,7 +224,7 @@ Interval
 Span_bar::get_spanned_interval (Grob *me)
 {
   return ly_scm2interval (Axis_group_interface::group_extent_callback
-                         (me->self_scm (), scm_int2num (Y_AXIS)));
+                         (me->self_scm (), scm_from_int (Y_AXIS)));
 }
 
 MAKE_SCHEME_CALLBACK (Span_bar, get_bar_size, 1);
@@ -237,9 +237,9 @@ Span_bar::get_bar_size (SCM smob)
     {
       /* This happens if the bars are hara-kiried from under us. */
       me->suicide ();
-      return scm_make_real (-1);
+      return scm_from_double (-1);
     }
-  return scm_make_real (iv.length ());
+  return scm_from_double (iv.length ());
 }
 
 ADD_INTERFACE (Span_bar, "span-bar-interface",
index ef0690fc329d193ba0619539ab9f89d250b8ec00..37edd6f436c9140125de14f3a3100214e84aa044 100644 (file)
@@ -103,9 +103,9 @@ LY_DEFINE (ly_grob_staff_position, "ly:grob-staff-position",
   Real pos = Staff_symbol_referencer::get_position (g);
 
   if (fabs (rint (pos) -pos) < 1e-6) // ugh.
-    return scm_int2num ((int) my_round (pos));
+    return scm_from_int ((int) my_round (pos));
   else
-    return scm_make_real (pos);
+    return scm_from_double (pos);
 }
 
 /* should use offset callback!  */
@@ -121,10 +121,10 @@ Staff_symbol_referencer::callback (SCM element_smob, SCM)
     {
       Real space = Staff_symbol_referencer::staff_space (me);
       off = scm_to_double (pos) * space / 2.0;
-      me->set_property ("staff-position", scm_int2num (0));
+      me->set_property ("staff-position", scm_from_int (0));
     }
 
-  return scm_make_real (off);
+  return scm_from_double (off);
 }
 
 /*  This sets the position relative to the center of the staff symbol.
@@ -146,10 +146,10 @@ Staff_symbol_referencer::set_position (Grob *me, Real p)
   if (st && me->common_refpoint (st, Y_AXIS))
     {
       Real oldpos = get_position (me);
-      me->set_property ("staff-position", scm_make_real (p - oldpos));
+      me->set_property ("staff-position", scm_from_double (p - oldpos));
     }
   else
-    me->set_property ("staff-position", scm_make_real (p));
+    me->set_property ("staff-position", scm_from_double (p));
 
   me->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
 }
index 91c1758977c44b3c0b24119b4028168239f5c99c..878f0054b54b51f36ad2d4b84ce4b7f7d6254ac2 100644 (file)
@@ -60,7 +60,7 @@ Stem_engraver::make_stem (Grob_info gi)
   Music *music = gi.music_cause ();
   Duration *dur = unsmob_duration (music->get_property ("duration"));
   
-  stem_->set_property ("duration-log", dur ? scm_int2num (dur->duration_log ()) : 0);
+  stem_->set_property ("duration-log", dur ? scm_from_int (dur->duration_log ()) : 0);
 
   if (tremolo_ev_)
     {
@@ -82,7 +82,7 @@ Stem_engraver::make_stem (Grob_info gi)
            requested_type = 8;
        }
       else
-       context ()->set_property ("tremoloFlags", scm_int2num (requested_type));
+       context ()->set_property ("tremoloFlags", scm_from_int (requested_type));
 
       int tremolo_flags = intlog2 (requested_type) - 2
        - (dur->duration_log () > 2 ? dur->duration_log () - 2 : 0);
@@ -98,7 +98,7 @@ Stem_engraver::make_stem (Grob_info gi)
 
          /* The number of tremolo flags is the number of flags of the
             tremolo-type minus the number of flags of the note itself.  */
-         tremolo_->set_property ("flag-count", scm_int2num (tremolo_flags));
+         tremolo_->set_property ("flag-count", scm_from_int (tremolo_flags));
          tremolo_->set_parent (stem_, X_AXIS);
          stem_->set_object ("tremolo-flag", tremolo_->self_scm ());
          tremolo_->set_object ("stem", stem_->self_scm ());
index 4dc00e7bf31e9fcfa682c13fc4ab24ef678e7fa3..f258b7aedad25edd22db88d73c4b426d1a7ce226 100644 (file)
@@ -47,7 +47,7 @@ Stem::set_beaming (Grob *me, int beam_count, Direction d)
 
   SCM lst = index_get_cell (pair, d);
   for (int i = 0; i < beam_count; i++)
-    lst = scm_cons (scm_int2num (i), lst);
+    lst = scm_cons (scm_from_int (i), lst);
   index_set_cell (pair, d, lst);
 }
 
@@ -92,7 +92,7 @@ Stem::stem_end_position (Grob *me)
   if (!scm_is_number (p))
     {
       pos = get_default_stem_end_position (me);
-      me->set_property ("stem-end-position", scm_make_real (pos));
+      me->set_property ("stem-end-position", scm_from_double (pos));
     }
   else
     pos = scm_to_double (p);
@@ -123,7 +123,7 @@ Stem::set_stemend (Grob *me, Real se)
   if (d && d * head_positions (me)[get_direction (me)] >= se * d)
     me->warning (_ ("weird stem size, check for narrow beams"));
 
-  me->set_property ("stem-end-position", scm_make_real (se));
+  me->set_property ("stem-end-position", scm_from_double (se));
 }
 
 /* Note head that determines hshift for upstems
@@ -753,7 +753,7 @@ Stem::offset_callback (SCM element_smob, SCM)
          r = rest->extent (rest, X_AXIS).center ();
        }
     }
-  return scm_make_real (r);
+  return scm_from_double (r);
 }
 
 Spanner *
@@ -892,8 +892,8 @@ Stem::calc_stem_info (Grob *me)
   Real shortest_y = minimum_y * my_dir;
 
   me->set_property ("stem-info",
-                   scm_list_2 (scm_make_real (ideal_y),
-                               scm_make_real (shortest_y)));
+                   scm_list_2 (scm_from_double (ideal_y),
+                               scm_from_double (shortest_y)));
 }
 
 Slice
index f88cdc4c7fd0593ddac254c842a35f9267fac99b..3964054daf4d8e6e2a77e8ce985947683d3925fc 100644 (file)
@@ -61,8 +61,8 @@ interpret_stencil_expression (SCM expr,
        {
          (*func) (func_arg,
                   scm_list_4 (ly_symbol2scm ("placebox"),
-                              scm_make_real (o[X_AXIS]),
-                              scm_make_real (o[Y_AXIS]),
+                              scm_from_double (o[X_AXIS]),
+                              scm_from_double (o[Y_AXIS]),
                               expr));
          return;
        }
index 9bd31d26c35ffa715ec022c2cd72af10c7107166..ab531db241c430218e8c08d0fb9315d59fb93783 100644 (file)
@@ -194,7 +194,7 @@ System::get_paper_systems ()
 
       System *system = dynamic_cast<System *> (broken_intos_[i]);
       system->post_processing ();
-      scm_vector_set_x (lines, scm_int2num (i), system->get_paper_system ());
+      scm_vector_set_x (lines, scm_from_int (i), system->get_paper_system ());
 
       if (be_verbose_global)
        progress_indication (to_string (i) + "]");
index 7d8ad6bd5c840a4440af15e7257b6924913b16b5..2f684d833ae63bf0d7e657e069911bb2d700dbfa 100644 (file)
@@ -112,7 +112,7 @@ Tab_note_heads_engraver::process_music ()
 
       Duration dur = *unsmob_duration (event->get_property ("duration"));
       note->set_property ("duration-log",
-                         scm_int2num (dur.duration_log ()));
+                         scm_from_int (dur.duration_log ()));
 
       if (dur.dot_count ())
        {
@@ -121,7 +121,7 @@ Tab_note_heads_engraver::process_music ()
 
          if (dur.dot_count ()
              != scm_to_int (d->get_property ("dot-count")))
-           d->set_property ("dot-count", scm_int2num (dur.dot_count ()));
+           d->set_property ("dot-count", scm_from_int (dur.dot_count ()));
 
          d->set_parent (note, Y_AXIS);
 
@@ -136,14 +136,14 @@ Tab_note_heads_engraver::process_music ()
       while (!string_found)
        {
          int fret = unsmob_pitch (scm_pitch)->semitone_pitch ()
-           - scm_to_int (scm_list_ref (stringTunings, scm_int2num (tab_string - 1)));
+           - scm_to_int (scm_list_ref (stringTunings, scm_from_int (tab_string - 1)));
          if (fret < min_fret)
            tab_string += high_string_one ? 1 : -1;
          else
            string_found = true;
        }
 
-      SCM text = scm_call_3 (proc, scm_int2num (tab_string), stringTunings, scm_pitch);
+      SCM text = scm_call_3 (proc, scm_from_int (tab_string), stringTunings, scm_pitch);
 
       int pos = 2 * tab_string - number_of_strings - 1; // No tab-note between the string !!!
       if (to_boolean (get_property ("stringOneTopmost")))
@@ -151,7 +151,7 @@ Tab_note_heads_engraver::process_music ()
 
       note->set_property ("text", text);
 
-      note->set_property ("staff-position", scm_int2num (pos));
+      note->set_property ("staff-position", scm_from_int (pos));
       notes_.push (note);
     }
 }
index aa220631e5651860b82573a3250cff1863ab005a..a518392d12dd8816baf198218ec29d8ba6351705 100644 (file)
@@ -27,7 +27,7 @@ Tab_staff_symbol_engraver::start_spanner ()
     {
       int k = scm_ilength (get_property ("stringTunings"));
       if (k >= 0)
-       span_->set_property ("line-count", scm_int2num (k));
+       span_->set_property ("line-count", scm_from_int (k));
     }
 }
 
index a5d9adfaf86941b81a6cf1cfdb2c5b533962af54..1adef0974242da0179a54125a44243f581a6ce6d 100644 (file)
@@ -95,7 +95,7 @@ Text_engraver::process_acknowledged ()
       /* see script-engraver.cc */
       priority += i;
 
-      text->set_property ("script-priority", scm_int2num (priority));
+      text->set_property ("script-priority", scm_from_int (priority));
 
       Direction dir = to_dir (r->get_property ("direction"));
       if (dir)
index 5bee235cd67d303f51b8cf82c51895ec6417c0b8..05b560b4bdb4a14e304ad588852afa8974a46e2a 100644 (file)
@@ -50,10 +50,10 @@ Timing_translator::initialize ()
   */
   context ()->add_alias (ly_symbol2scm ("Timing"));
   context ()->set_property ("timing", SCM_BOOL_T);
-  context ()->set_property ("currentBarNumber", scm_int2num (1));
+  context ()->set_property ("currentBarNumber", scm_from_int (1));
 
   context ()->set_property ("timeSignatureFraction",
-                           scm_cons (scm_int2num (4), scm_int2num (4)));
+                           scm_cons (scm_from_int (4), scm_from_int (4)));
   /*
     Do not init measurePosition; this should be done from global
     context.
@@ -131,7 +131,7 @@ Timing_translator::start_translation_timestep ()
       b++;
     }
 
-  context ()->set_property ("currentBarNumber", scm_int2num (b));
+  context ()->set_property ("currentBarNumber", scm_from_int (b));
   context ()->set_property ("measurePosition", measposp.smobbed_copy ());
 }
 
index 393dfe4ff16c3a9810030cc617bd52b45ce1ec22..05849e1f8d09399c2ec01c01aed8f85a384d6c6c 100644 (file)
@@ -27,8 +27,8 @@ protected:
   virtual void finalize ();
   DECLARE_ACKNOWLEDGER(note_column);
   virtual bool try_music (Music *);
-  PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
-  PRECOMPUTED_VIRTUAL void process_music ();
+  void stop_translation_timestep ();
+  void process_music ();
 
 private:
   Spanner *span_;
index d7032e04ae8d0fb0d4b41e9c86b86508a8883391..fb0871e88629ec75128d988021dc33391143a77c 100644 (file)
@@ -472,16 +472,16 @@ Tuplet_bracket::after_line_breaking (SCM smob)
 
   if (scm_is_number (lp) && !scm_is_number (rp))
     {
-      rp = scm_make_real (scm_to_double (lp) + dy);
+      rp = scm_from_double (scm_to_double (lp) + dy);
     }
   else if (scm_is_number (rp) && !scm_is_number (lp))
     {
-      lp = scm_make_real (scm_to_double (rp) - dy);
+      lp = scm_from_double (scm_to_double (rp) - dy);
     }
   else if (!scm_is_number (rp) && !scm_is_number (lp))
     {
-      lp = scm_make_real (offset);
-      rp = scm_make_real (offset + dy);
+      lp = scm_from_double (offset);
+      rp = scm_from_double (offset + dy);
     }
 
   me->set_property ("left-position", lp);
index 12b5db31d8a468df8744f9658211391823669e74..404e724d1730c6970ea07fbbc6d9a5ae7b933e91 100644 (file)
@@ -37,8 +37,8 @@ protected:
 
   DECLARE_ACKNOWLEDGER(note_column);
   virtual bool try_music (Music *r);
-  PRECOMPUTED_VIRTUAL void start_translation_timestep ();
-  PRECOMPUTED_VIRTUAL void process_music ();
+  void start_translation_timestep ();
+  void process_music ();
 };
 
 bool
index 94692d483d4962ff28936e7958344dc6040d7dce..72fdb41f50317e2e0e21fca5cf1307e224bc8a6d 100644 (file)
@@ -262,7 +262,7 @@ Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
        * Save the head's final x-offset.
        */
       primitive->set_property ("x-offset",
-                              scm_make_real (x_offset));
+                              scm_from_double (x_offset));
 
       /*
        * If the head is the 2nd head of a pes or flexa (but not a
@@ -389,7 +389,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        {
          context_info |= STACKED_HEAD;
          primitive->set_property ("context-info",
-                                  scm_int2num (context_info));
+                                  scm_from_int (context_info));
        }
 
       /*
@@ -527,16 +527,16 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
          check_for_prefix_loss (prev_primitive);
          prev_glyph_name = "flexa";
          prev_primitive->set_property ("flexa-height",
-                                       scm_int2num (prev_delta_pitch));
+                                       scm_from_int (prev_delta_pitch));
          prev_primitive->set_property ("flexa-width",
-                                       scm_make_real (flexa_width));
+                                       scm_from_double (flexa_width));
          bool add_cauda = !(prev_prefix_set && PES_OR_FLEXA);
          prev_primitive->set_property ("add-cauda",
                                        ly_bool2scm (add_cauda));
          check_for_prefix_loss (primitive);
          glyph_name = "";
          primitive->set_property ("flexa-width",
-                                  scm_make_real (flexa_width));
+                                  scm_from_double (flexa_width));
        }
 
       /*
@@ -569,7 +569,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
        * ligature grob's value for thickness to each ligature head (even
        * if not all of them need to know).
        */
-      primitive->set_property ("thickness", scm_make_real (thickness));
+      primitive->set_property ("thickness", scm_from_double (thickness));
 
       prev_primitive = primitive;
       prev_prefix_set = prefix_set;
@@ -592,7 +592,7 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
                             "setting `spacing-increment = %f': ptr =%ul",
                             ligature_width, paper_column));
   paper_column->
-    set_property ("forced-spacing", scm_make_real (ligature_width));
+    set_property ("forced-spacing", scm_from_double (ligature_width));
 #endif
 }
 
index 8a05d5e27748578e34fc88fcc85c780b5503bce7..3e048c2fcddc86de1ed5677e0f55cee769d82b7e 100644 (file)
@@ -30,7 +30,7 @@ public:
 
 protected:
   virtual void derived_mark () const;
-  PRECOMPUTED_VIRTUAL void process_music ();
+  void process_music ();
   virtual void finalize ();
   virtual void initialize ();
 };
index 089045005f0129a924bfe5553396e4f83d0b87df..613c49d276523c4ac71e3b868f3cd3ac68bfed68 100644 (file)
@@ -33,8 +33,8 @@ protected:
   
   virtual void finalize ();
 
-  PRECOMPUTED_VIRTUAL void stop_translation_timestep ();
-  PRECOMPUTED_VIRTUAL void process_music ();
+  void stop_translation_timestep ();
+  void process_music ();
 
   Moment started_mom_;
   Spanner *volta_span_;