]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue4141/2: Use Xxx:is_smob instead of Xxx:unsmob when used in boolean contexts
authorDavid Kastrup <dak@gnu.org>
Mon, 29 Sep 2014 17:39:22 +0000 (19:39 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 6 Oct 2014 07:31:20 +0000 (09:31 +0200)
This saves a memory access and comparison and leads to better code
even when unsmob is called afterwards anyway.

73 files changed:
lily/accidental-placement.cc
lily/ambitus-engraver.cc
lily/axis-group-engraver.cc
lily/axis-group-interface.cc
lily/bar-check-iterator.cc
lily/beam-collision-engraver.cc
lily/beam-quanting.cc
lily/book.cc
lily/break-alignment-interface.cc
lily/break-substitution.cc
lily/chord-name-engraver.cc
lily/context-property.cc
lily/context.cc
lily/dots-engraver.cc
lily/engraver-scheme.cc
lily/engraver.cc
lily/fingering-engraver.cc
lily/function-documentation.cc
lily/global-context-scheme.cc
lily/grob-closure.cc
lily/grob-info.cc
lily/grob-property.cc
lily/grob-scheme.cc
lily/grob.cc
lily/include/lily-guile-macros.hh
lily/include/smobs.tcc
lily/input-scheme.cc
lily/item-scheme.cc
lily/lexer.ll
lily/lily-lexer.cc
lily/multi-measure-rest.cc
lily/music-function-scheme.cc
lily/music-scheme.cc
lily/music.cc
lily/new-fingering-engraver.cc
lily/note-column.cc
lily/note-heads-engraver.cc
lily/note-performer.cc
lily/note-spacing-engraver.cc
lily/page-layout-problem.cc
lily/paper-book.cc
lily/paper-column-engraver.cc
lily/paper-column.cc
lily/paper-score-scheme.cc
lily/parser.yy
lily/performance-scheme.cc
lily/pitched-trill-engraver.cc
lily/pointer-group-interface-scheme.cc
lily/prob.cc
lily/pure-from-neighbor-interface.cc
lily/scm-hash.cc
lily/score.cc
lily/side-position-interface.cc
lily/simple-closure.cc
lily/slur.cc
lily/spaceable-grob.cc
lily/spacing-basic.cc
lily/spacing-determine-loose-columns.cc
lily/spacing-engraver.cc
lily/spanner-scheme.cc
lily/stem-engraver.cc
lily/stem.cc
lily/stream-event-scheme.cc
lily/stream-event.cc
lily/tempo-performer.cc
lily/tie.cc
lily/timing-translator.cc
lily/translator-group.cc
lily/tuplet-bracket.cc
lily/unfolded-repeat-iterator.cc
lily/unpure-pure-container.cc
lily/vertical-align-engraver.cc
lily/volta-engraver.cc

index edc176a5207b8e2a7428b67ea7f5e05a120438d5..c00c5574fe9f1b7a1243d55ae7cb574a4b568db7 100644 (file)
@@ -87,7 +87,7 @@ Accidental_placement::split_accidentals (Grob *accs,
       {
         Grob *a = Grob::unsmob (scm_car (s));
 
-        if (Grob::unsmob (a->get_object ("tie"))
+        if (Grob::is_smob (a->get_object ("tie"))
             && !to_boolean (a->get_property ("forced")))
           break_reminder->push_back (a);
         else
index 972ca2932ca05ddbf103e200abaab98ceaf26d70..f7b18b59019fc2b2357085b4f2097b4e2caa6100 100644 (file)
@@ -143,7 +143,7 @@ Ambitus_engraver::acknowledge_note_head (Grob_info info)
         If the engraver is added to a percussion context,
         filter out unpitched note heads.
       */
-      if (!Pitch::unsmob (p))
+      if (!Pitch::is_smob (p))
         return;
       Pitch pitch = *Pitch::unsmob (p);
       Drul_array<bool> expands = pitch_interval_.add_point (pitch);
index 8c24ef86a3d6c2f597c9c577250fa14abae26472..a09fd04af30dad5dfcf1acce3c1df75cc736e921 100644 (file)
@@ -141,7 +141,7 @@ Axis_group_engraver::process_acknowledged ()
 
   for (vsize i = 0; i < elts_.size (); i++)
     {
-      if (!Grob::unsmob (elts_[i]->get_object ("axis-group-parent-Y")))
+      if (!Grob::is_smob (elts_[i]->get_object ("axis-group-parent-Y")))
         {
           if (staffline_->get_parent (Y_AXIS)
               && staffline_->get_parent (Y_AXIS) == elts_[i])
index e27ce099c5bee8868e736b3e6514e5ba1984fc7c..7e8e1b8bb41020fbd56bda1f6ec02d72794d43f4 100644 (file)
@@ -421,7 +421,7 @@ Axis_group_interface::combine_skylines (SCM smob)
   for (vsize i = 0; i < elements.size (); i++)
     {
       SCM skyline_scm = elements[i]->get_property ("vertical-skylines");
-      if (Skyline_pair::unsmob (skyline_scm))
+      if (Skyline_pair::is_smob (skyline_scm))
         {
           Real offset = elements[i]->relative_coordinate (y_common, Y_AXIS);
           Skyline_pair other = *Skyline_pair::unsmob (skyline_scm);
index 848736b8d4ca9ae1fdde2511a83ec57be721fa2d..79e346365df8a76b5c45f7f50ebc62852125a65b 100644 (file)
@@ -73,7 +73,7 @@ Bar_check_iterator::process (Moment m)
           else
             {
               SCM lf = tr->get_property ("barCheckLastFail");
-              if (Moment::unsmob (lf)
+              if (Moment::is_smob (lf)
                   && *Moment::unsmob (lf) == *where)
                 warn = false;
               else
index dd03c7be0c19af7bc89cec922996f2833f8a8d2e..d2fde8419c82d12bb66a194250d7e8f64f85882f 100644 (file)
@@ -121,7 +121,7 @@ Beam_collision_engraver::finalize ()
             {
               // Do not consider note heads attached to the beam.
               if (Stem::has_interface (covered_grob))
-                if (Grob::unsmob (covered_grob->get_object ("beam")))
+                if (Grob::is_smob (covered_grob->get_object ("beam")))
                   continue;
 
               if (Grob *stem = Grob::unsmob (covered_grob->get_object ("stem")))
index c73f91fbc828580c3276c69a61fc1da487ec7e9f..ab98dd50bce9589f56ea6e0de7da096df53eb658 100644 (file)
@@ -371,7 +371,7 @@ void Beam_scoring_problem::init_instance_variables (Grob *me, Drul_array<Real> y
                          - my_y;
 
           Real factor = parameters_.STEM_COLLISION_FACTOR;
-          if (!Grob::unsmob (s->get_object ("beam")))
+          if (!Grob::is_smob (s->get_object ("beam")))
             factor = 1.0;
           add_collision (x, y, factor);
         }
index 21fb405c857d711836bfc4bb4e7576b9bbe9a93d..a6750d78cbf7ac3e43c17bb0b26c8777341de437 100644 (file)
@@ -240,7 +240,7 @@ Book::process_score (SCM s, Paper_book *output_paper_book, Output_def *layout)
         }
     }
   else if (Text_interface::is_markup_list (scm_car (s))
-           || Page_marker::unsmob (scm_car (s)))
+           || Page_marker::is_smob (scm_car (s)))
     output_paper_book->add_score (scm_car (s));
   else
     assert (0);
index 1744c60214bcb78501ff367d189d5db1fa3762cb..f9993b0892eeaeeef84fb363bce37edc737453cf 100644 (file)
@@ -189,7 +189,7 @@ Break_alignment_interface::calc_positioning_done (SCM smob)
             sym_string = ly_symbol2string (rsym);
 
           string orig_string;
-          if (Grob::unsmob (l->get_property ("cause")))
+          if (Grob::is_smob (l->get_property ("cause")))
             orig_string = Grob::unsmob (l->get_property ("cause"))->name ();
 
           programming_error (to_string ("No spacing entry from %s to `%s'",
index e0b0fadfcd29a41303fa9369bb41b7dbe7c47cb0..094411f7d115a9f9e823db8f18470b95bc8b8f80 100644 (file)
@@ -101,7 +101,7 @@ do_break_substitution (SCM src)
 {
 again:
 
-  if (Grob::unsmob (src))
+  if (Grob::is_smob (src))
     {
       Grob *new_ptr = substitute_grob (Grob::unsmob (src));
       return new_ptr ? new_ptr->self_scm () : SCM_UNDEFINED;
@@ -408,7 +408,7 @@ Spanner::fast_substitute_grob_array (SCM sym,
       set_break_subsititution (l ? l->self_scm () : SCM_UNDEFINED);
 
       SCM newval = sc->internal_get_object (sym);
-      if (!Grob_array::unsmob (newval))
+      if (!Grob_array::is_smob (newval))
         {
           newval = Grob_array::make_array ();
           sc->set_object (sym, newval);
@@ -511,7 +511,7 @@ Spanner::substitute_one_mutable_property (SCM sym,
         if (grob_array)
           {
             SCM newval = sc->internal_get_object (sym);
-            if (!Grob_array::unsmob (newval))
+            if (!Grob_array::is_smob (newval))
               {
                 newval = Grob_array::make_array ();
                 sc->set_object (sym, newval);
index dba699c8f4aaf119f0de742c33d96ca6fb3fefc7..ded53c5534421a7a5332ab08c25824c5e81c146e 100644 (file)
@@ -96,7 +96,7 @@ Chord_name_engraver::process_music ()
             {
               Stream_event *n = notes_[i];
               SCM p = n->get_property ("pitch");
-              if (!Pitch::unsmob (p))
+              if (!Pitch::is_smob (p))
                 continue;
 
               if (n->get_property ("bass") == SCM_BOOL_T)
index 7dba9d6e8506b0aa1d127136d321dbe80a0fc46b..45b5d496c12b522495c902010de87333afdff186 100644 (file)
@@ -59,7 +59,7 @@ typecheck_grob (SCM symbol, SCM value)
     return typecheck_grob (symbol, upc->unpure_part ())
       && typecheck_grob (symbol, upc->pure_part ());
   return ly_is_procedure (value)
-    || Simple_closure::unsmob (value)
+    || Simple_closure::is_smob (value)
     || type_check_assignment (symbol, value, ly_symbol2scm ("backend-type?"));
 }
 
index e43c10dc2aa49a9f8f5c6842651c535d4f51fcbc..3128f5955ade258df4531381b57a2237e7143052 100644 (file)
@@ -741,7 +741,7 @@ measure_length (Context const *context)
 {
   SCM l = context->get_property ("measureLength");
   Rational length (1);
-  if (Moment::unsmob (l))
+  if (Moment::is_smob (l))
     length = Moment::unsmob (l)->main_part_;
   return length;
 }
@@ -752,7 +752,7 @@ measure_position (Context const *context)
   SCM sm = context->get_property ("measurePosition");
 
   Moment m = 0;
-  if (Moment::unsmob (sm))
+  if (Moment::is_smob (sm))
     {
       m = *Moment::unsmob (sm);
 
index c8883e8d3712b23778f7fc44d54f35269a7b6c8e..2efd2215b861ea4213f2d708869f35e6cb1b2c14 100644 (file)
@@ -43,7 +43,7 @@ Dots_engraver::acknowledge_rhythmic_head (Grob_info gi)
     return;
 
   Grob *note = gi.grob ();
-  if (Grob::unsmob (note->get_object ("dot")))
+  if (Grob::is_smob (note->get_object ("dot")))
     return;
 
   Duration *dur = Duration::unsmob (cause->get_property ("duration"));
index 5596a2f2f8b7702e8e779b0d6204825a0e5c54a5..8bdea635db3ccca573f4d3926fbfee9513f233c2 100644 (file)
@@ -27,7 +27,7 @@ LY_DEFINE (ly_engraver_make_grob, "ly:engraver-make-grob",
            "  @var{cause} should either be another grob"
            " or a music event.")
 {
-  LY_ASSERT_TYPE (Engraver::unsmob, engraver, 1);
+  LY_ASSERT_SMOB (Engraver, engraver, 1);
   LY_ASSERT_TYPE (ly_is_symbol, grob_name, 2);
   LY_ASSERT_TYPE (ly_is_grob_cause, cause, 3);
 
@@ -45,7 +45,7 @@ LY_DEFINE (ly_engraver_announce_end_grob, "ly:engraver-announce-end-grob",
            " @var{grob} being a grob.  @var{cause} should either"
            " be another grob or a music event.")
 {
-  LY_ASSERT_TYPE (Engraver::unsmob, engraver, 1);
+  LY_ASSERT_SMOB (Engraver, engraver, 1);
   LY_ASSERT_SMOB (Grob, grob, 2);
   LY_ASSERT_TYPE (ly_is_grob_cause, cause, 3);
 
index e6d3142b141291cec0d46e7ca367f018d967fb65..681c646f422e1923522eb75ac1d0f708d4522493 100644 (file)
@@ -57,7 +57,7 @@ Engraver::make_grob_info (Grob *e, SCM cause)
       cause = m->to_event ()->unprotect ();
     }
   if (e->get_property ("cause") == SCM_EOL
-      && (Stream_event::unsmob (cause) || Grob::unsmob (cause)))
+      && (Stream_event::is_smob (cause) || Grob::is_smob (cause)))
     e->set_property ("cause", cause);
 
   return Grob_info (this, e);
@@ -174,7 +174,7 @@ Engraver::internal_make_spanner (SCM x, SCM cause, char const *name,
 bool
 ly_is_grob_cause (SCM obj)
 {
-  return Grob::unsmob (obj) || Stream_event::unsmob (obj) || (obj == SCM_EOL);
+  return Grob::is_smob (obj) || Stream_event::is_smob (obj) || (obj == SCM_EOL);
 }
 
 #include "translator.icc"
index 5e4241d5318ed34a666e91f2e8f5fe95be6497f0..f14b9d62d434c0174a46b3e4599b10f4e28ccc14 100644 (file)
@@ -101,7 +101,7 @@ Fingering_engraver::make_script (Direction d, Stream_event *r, int i)
     junkme.
   */
   SCM pitch = r->get_property ("pitch");
-  if (Pitch::unsmob (pitch))
+  if (Pitch::is_smob (pitch))
     fingering->set_property ("pitch", pitch);
 
   /*
index 9cddf41b7412fa36c383b2c3f927dbef0f7c031b..2d8f6be8e47119058c5ea65f912848a31c857c06 100644 (file)
@@ -103,15 +103,15 @@ void
 init_func_doc ()
 {
   ly_add_type_predicate ((void *) &is_direction, "direction");
-  ly_add_type_predicate ((void *) &Music_function::unsmob, "Music_function");
+  ly_add_type_predicate ((void *) &Music_function::is_smob, "Music_function");
   ly_add_type_predicate ((void *) &ly_is_port, "port");
   ly_add_type_predicate ((void *) &ly_cheap_is_list, "list");
-  ly_add_type_predicate ((void *) &Global_context::unsmob, "Global_context");
-  ly_add_type_predicate ((void *) &Input::unsmob, "Input");
-  ly_add_type_predicate ((void *) &Moment::unsmob, "Moment");
-  ly_add_type_predicate ((void *) &Paper_score::unsmob, "Paper_score");
-  ly_add_type_predicate ((void *) &Performance::unsmob, "Performance");
-  ly_add_type_predicate ((void *) &Unpure_pure_container::unsmob, "unpure pure container");
+  ly_add_type_predicate ((void *) &Global_context::is_smob, "Global_context");
+  ly_add_type_predicate ((void *) &Input::is_smob, "Input");
+  ly_add_type_predicate ((void *) &Moment::is_smob, "Moment");
+  ly_add_type_predicate ((void *) &Paper_score::is_smob, "Paper_score");
+  ly_add_type_predicate ((void *) &Performance::is_smob, "Performance");
+  ly_add_type_predicate ((void *) &Unpure_pure_container::is_smob, "unpure pure container");
   ly_add_type_predicate ((void *) &is_axis, "axis");
   ly_add_type_predicate ((void *) &is_number_pair, "number pair");
   ly_add_type_predicate ((void *) &ly_is_list, "list");
@@ -124,10 +124,10 @@ init_func_doc ()
   ly_add_type_predicate ((void *) &scm_is_rational, "rational");
   ly_add_type_predicate ((void *) &scm_is_string, "string");
   ly_add_type_predicate ((void *) &scm_is_vector, "vector");
-  ly_add_type_predicate ((void *) &Item::unsmob, "Item");
-  ly_add_type_predicate ((void *) &Music::unsmob, "Music");
-  ly_add_type_predicate ((void *) &Spanner::unsmob, "Spanner");
-  ly_add_type_predicate ((void *) &Stream_event::unsmob, "Stream_event");
+  ly_add_type_predicate ((void *) &Item::is_smob, "Item");
+  ly_add_type_predicate ((void *) &Music::is_smob, "Music");
+  ly_add_type_predicate ((void *) &Spanner::is_smob, "Spanner");
+  ly_add_type_predicate ((void *) &Stream_event::is_smob, "Stream_event");
 }
 
 ADD_SCM_INIT_FUNC (func_doc, init_func_doc);
index 7af3e4ed57dd2631f840753b675c30999ff3504d..dc7ff6e560e75a5bc2abacaf53b0c7e3e6c1fb5d 100644 (file)
@@ -36,7 +36,7 @@ LY_DEFINE (ly_format_output, "ly:format-output",
 {
   Global_context *g = dynamic_cast<Global_context *> (Context::unsmob (context));
 
-  LY_ASSERT_TYPE (Global_context::unsmob, context, 1);
+  LY_ASSERT_SMOB (Global_context, context, 1);
 
   SCM output = g->get_output ();
   progress_indication ("\n");
@@ -53,7 +53,7 @@ LY_DEFINE (ly_make_global_translator, "ly:make-global-translator",
            " @var{global}.  The translator group is returned.")
 {
   Global_context *g = dynamic_cast<Global_context *> (Context::unsmob (global));
-  LY_ASSERT_TYPE (Global_context::unsmob, global, 1);
+  LY_ASSERT_SMOB (Global_context, global, 1);
 
   Translator_group *tg = new Translator_group ();
   tg->connect_to_context (g);
@@ -87,7 +87,7 @@ LY_DEFINE (ly_interpret_music_expression, "ly:interpret-music-expression",
            " @var{ctx}.  The context is returned in its final state.")
 {
   LY_ASSERT_SMOB (Music, mus, 1);
-  LY_ASSERT_TYPE (Global_context::unsmob, ctx, 2);
+  LY_ASSERT_SMOB (Global_context, ctx, 2);
 
   Music *music = Music::unsmob (mus);
   if (!music)
index 03c68684c78eab0e47f35f4a4052ae711bb98b64..ee4d1b04076c6e8d434d9333102e1af1b1e59d5f 100644 (file)
@@ -33,13 +33,13 @@ add_offset_callback (Grob *g, SCM proc, Axis a)
   SCM data = g->get_property_data (axis_offset_symbol (a));
   if (!scm_is_number (data)
       && !ly_is_procedure (data)
-      && !Simple_closure::unsmob (data))
+      && !Simple_closure::is_smob (data))
     {
       g->set_property (axis_offset_symbol (a), proc);
       return;
     }
 
-  if (ly_is_procedure (data) || Unpure_pure_container::unsmob (data))
+  if (ly_is_procedure (data) || Unpure_pure_container::is_smob (data))
     data = Simple_closure::make_smob (scm_list_1 (data));
   else if (Simple_closure *sc = Simple_closure::unsmob (data))
     data = sc->expression ();
@@ -67,7 +67,7 @@ chain_callback (Grob *g, SCM proc, SCM sym)
 {
   SCM data = g->get_property_data (sym);
 
-  if (ly_is_procedure (data) || Unpure_pure_container::unsmob (data))
+  if (ly_is_procedure (data) || Unpure_pure_container::is_smob (data))
     data = Simple_closure::make_smob (scm_list_1 (data));
   else if (Simple_closure *sc = Simple_closure::unsmob (data))
     data = sc->expression ();
index 3a90b8c896eb37a4c9069200a057d86a4e02257d..419b7ff4fcf57a47d165bf20ff7e45186e2b6f79 100644 (file)
@@ -90,7 +90,7 @@ Stream_event *
 Grob_info::ultimate_event_cause () const
 {
   SCM cause = grob_->self_scm ();
-  while (Grob::unsmob (cause))
+  while (Grob::is_smob (cause))
     {
       cause = Grob::unsmob (cause)->get_property ("cause");
     }
index 2c099a256b0a624123ea451e0865cef79ee6e08b..779f0e91cbcb4712deb96e765e5f4db4f8c4c506 100644 (file)
@@ -123,8 +123,8 @@ Grob::internal_set_value_on_alist (SCM *alist, SCM sym, SCM v)
   if (do_internal_type_checking_global)
     {
       if (!ly_is_procedure (v)
-          && !Simple_closure::unsmob (v)
-          && !Unpure_pure_container::unsmob (v)
+          && !Simple_closure::is_smob (v)
+          && !Unpure_pure_container::is_smob (v)
           && v != ly_symbol2scm ("calculation-in-progress"))
         type_check_assignment (sym, v, ly_symbol2scm ("backend-type?"));
 
@@ -151,8 +151,8 @@ Grob::internal_get_property_data (SCM sym) const
   if (do_internal_type_checking_global && scm_is_pair (handle))
     {
       SCM val = scm_cdr (handle);
-      if (!ly_is_procedure (val) && !Simple_closure::unsmob (val)
-          && !Unpure_pure_container::unsmob (val))
+      if (!ly_is_procedure (val) && !Simple_closure::is_smob (val)
+          && !Unpure_pure_container::is_smob (val))
         type_check_assignment (sym, val, ly_symbol2scm ("backend-type?"));
 
       check_interfaces_for_property (this, sym);
@@ -184,7 +184,7 @@ Grob::internal_get_property (SCM sym) const
     val = upc->unpure_part ();
 
   if (ly_is_procedure (val)
-      || Simple_closure::unsmob (val))
+      || Simple_closure::is_smob (val))
     {
       Grob *me = ((Grob *)this);
       val = me->try_callback_on_alist (&me->mutable_property_alist_, sym, val);
@@ -304,8 +304,8 @@ Grob::internal_get_object (SCM sym) const
     {
       SCM val = scm_cdr (s);
       if (ly_is_procedure (val)
-          || Simple_closure::unsmob (val)
-          || Unpure_pure_container::unsmob (val))
+          || Simple_closure::is_smob (val)
+          || Unpure_pure_container::is_smob (val))
         {
           Grob *me = ((Grob *)this);
           val = me->try_callback_on_alist (&me->object_alist_, sym, val);
index 3c9d1bb24131a84664cee39f1c5995b775f1bc28..8273061ebf616b0639f00caf1cf4acacfffbeadb 100644 (file)
@@ -51,7 +51,7 @@ LY_DEFINE (ly_grob_set_property_x, "ly:grob-set-property!",
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   if (!ly_is_procedure (val)
-      && !Simple_closure::unsmob (val)
+      && !Simple_closure::is_smob (val)
       && !type_check_assignment (sym, val, ly_symbol2scm ("backend-type?")))
     error ("typecheck failed");
 
@@ -451,7 +451,7 @@ LY_DEFINE (ly_grob_chain_callback, "ly:grob-chain-callback",
   Grob *gr = Grob::unsmob (grob);
 
   LY_ASSERT_SMOB (Grob, grob, 1);
-  SCM_ASSERT_TYPE (ly_is_procedure (proc) || Unpure_pure_container::unsmob (proc), proc, SCM_ARG2, __FUNCTION__, "procedure or unpure pure container");
+  SCM_ASSERT_TYPE (ly_is_procedure (proc) || Unpure_pure_container::is_smob (proc), proc, SCM_ARG2, __FUNCTION__, "procedure or unpure pure container");
   LY_ASSERT_TYPE (ly_is_symbol, sym, 3);
 
   chain_callback (gr, proc, sym);
index e4c1fd4a89f0142370dc091f378064cb737305e9..a41ac5d006bd4873fbb3d1eb887e9e0139c12132 100644 (file)
@@ -855,7 +855,7 @@ SCM
 Grob::pure_stencil_height (SCM smob, SCM /* beg */, SCM /* end */)
 {
   Grob *me = Grob::unsmob (smob);
-  if (Stencil::unsmob (me->get_property_data ("stencil")))
+  if (Stencil::is_smob (me->get_property_data ("stencil")))
     return grob_stencil_extent (me, Y_AXIS);
 
   return ly_interval2scm (Interval ());
index 1bdf9aa7bc20a75db5f1565e210eaf216858dd3b..a858a0a2ed1ec4c9d1c44f3302689eba19f794f9 100644 (file)
@@ -216,6 +216,6 @@ void ly_check_name (const string &cxx, const string &fname);
       }                                                                 \
   }
 
-#define LY_ASSERT_SMOB(klass, var, number) LY_ASSERT_TYPE(klass::unsmob, var, number)
+#define LY_ASSERT_SMOB(klass, var, number) LY_ASSERT_TYPE(klass::is_smob, var, number)
 
 #endif /* LILY_GUILE_MACROS_HH */
index c2616b321692ec431f4c0dea55370872b0ab976f..eaec076de349442b1b4726e07f71c1160e097b76 100644 (file)
@@ -121,7 +121,7 @@ void Smob_base<Super>::init ()
                                      fundoc);
       scm_c_export (Super::type_p_name_, NULL);
     }
-  ly_add_type_predicate ((void *) unsmob, smob_name_.c_str ());
+  ly_add_type_predicate ((void *) is_smob, smob_name_.c_str ());
   if (Super::smob_proc != 0)
     scm_set_smob_apply (smob_tag_,
                         (scm_t_subr)Super::smob_proc,
index f8bef3bda8aa930e66d915e5e877409d6df2e7c4..37b7524fd770e033e05004e2840f8818b7ac430c 100644 (file)
@@ -27,7 +27,7 @@ LY_DEFINE (ly_input_warning, "ly:input-warning", 2, 0, 1, (SCM sip, SCM msg, SCM
 {
   Input *ip = Input::unsmob (sip);
 
-  LY_ASSERT_TYPE (Input::unsmob, sip, 1);
+  LY_ASSERT_SMOB (Input, sip, 1);
   LY_ASSERT_TYPE (scm_is_string, msg, 2);
 
   msg = scm_simple_format (SCM_BOOL_F, msg, rest);
@@ -45,7 +45,7 @@ LY_DEFINE (ly_input_message, "ly:input-message", 2, 0, 1, (SCM sip, SCM msg, SCM
 {
   Input *ip = Input::unsmob (sip);
 
-  LY_ASSERT_TYPE (Input::unsmob, sip, 1);
+  LY_ASSERT_SMOB (Input, sip, 1);
   LY_ASSERT_TYPE (scm_is_string, msg, 2);
 
   msg = scm_simple_format (SCM_BOOL_F, msg, rest);
@@ -62,7 +62,7 @@ LY_DEFINE (ly_input_file_line_char_column,
            "Return input location in @var{sip} as"
            " @code{(file-name line char column)}.")
 {
-  LY_ASSERT_TYPE (Input::unsmob, sip, 1);
+  LY_ASSERT_SMOB (Input, sip, 1);
   Input *ip = Input::unsmob (sip);
 
   int l, ch, col, offset = 0;
@@ -80,7 +80,7 @@ LY_DEFINE (ly_input_both_locations,
            " @code{(file-name first-line first-column last-line last-column)}.")
 {
 
-  LY_ASSERT_TYPE (Input::unsmob, sip, 1);
+  LY_ASSERT_SMOB (Input, sip, 1);
   Input *ip = Input::unsmob (sip);
 
   return scm_list_5 (ly_string2scm (ip->file_string ()),
index 0887ac3d9af71a7f60577bb23667d8a98e76318e..58b98b29f59305503ba191c9eeb6540be6bb6719 100644 (file)
@@ -35,7 +35,7 @@ LY_DEFINE (ly_item_break_dir, "ly:item-break-dir",
            " end of line, @code{0}@tie{}unbroken, and"
            " @code{1}@tie{}beginning of line.")
 {
-  LY_ASSERT_TYPE (Item::unsmob, it, 1);
+  LY_ASSERT_SMOB (Item, it, 1);
   Item *me = Item::unsmob (it);
   return scm_from_int (me->break_status_dir ());
 }
index f242158df78a0ad137efa96ea1da64d97d65908e..63776c9a9c42e21d93bdba22a0bc5700d52ff251 100644 (file)
@@ -1013,7 +1013,7 @@ Lily_lexer::scan_bare_word (const string &str)
                
                if (scm_is_pair (handle)) {
                        yylval = scm_cdr (handle);
-                       if (Pitch::unsmob (yylval))
+                       if (Pitch::is_smob (yylval))
                            return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
                        else if (scm_is_symbol (yylval))
                            return DRUM_PITCH;
@@ -1097,7 +1097,7 @@ Lily_lexer::eval_scm (SCM readerdata, Input hi, char extra_token)
                                SCM v = scm_car (p);
                                if (Music *m = Music::unsmob (v))
                                {
-                                       if (!Input::unsmob (m->get_property ("origin")))
+                                       if (!Input::is_smob (m->get_property ("origin")))
                                                m->set_spot (override_input (here_input ()));
                                }
                                        
@@ -1122,7 +1122,7 @@ Lily_lexer::eval_scm (SCM readerdata, Input hi, char extra_token)
 
        if (Music *m = Music::unsmob (sval))
        {
-               if (!Input::unsmob (m->get_property ("origin")))
+               if (!Input::is_smob (m->get_property ("origin")))
                        m->set_spot (override_input (here_input ()));
        }
 
index c02143da4ccc556323dab062f9b2649b9e3e0725..dac09f1cc19147dcc99d396719f4b909ba4a0202 100644 (file)
@@ -123,7 +123,7 @@ Lily_lexer::Lily_lexer (Lily_lexer const &src, Lily_parser *parser,
   main_input_level_ = 0;
 
   extra_tokens_ = SCM_EOL;
-  if (Input::unsmob (override_input))
+  if (Input::is_smob (override_input))
     override_input_ = *Input::unsmob (override_input);
 
   smobify_self ();
index 8d653d0c167ccbab4b9167cc25495a08437d2041..c8a0525d66cf414fb9f1fb11c729405e6b825e41 100644 (file)
@@ -191,7 +191,7 @@ calc_measure_duration_log (Grob *me, bool paranoid)
 {
   SCM sml = dynamic_cast<Spanner *> (me)->get_bound (LEFT)
             ->get_property ("measure-length");
-  Rational ml = (Moment::unsmob (sml)) ? Moment::unsmob (sml)->main_part_
+  Rational ml = (Moment::is_smob (sml)) ? Moment::unsmob (sml)->main_part_
                 : Rational (1);
   double measure_duration = ml.Rational::to_double ();
   bool force_round_up = to_boolean (scm_list_p (scm_member (scm_cons (scm_from_int64 (ml.numerator ()),
index 016b96700d0fdfb71c19ba0b9ed944810baf31e6..3afb1099f03c388ce74ebc9e3372ec81b7def2e2 100644 (file)
@@ -4,7 +4,7 @@ LY_DEFINE (ly_music_function_extract, "ly:music-function-extract", 1, 0, 0,
            (SCM x),
            "Return the Scheme function inside@tie{}@var{x}.")
 {
-  LY_ASSERT_TYPE (Music_function::unsmob, x, 1);
+  LY_ASSERT_SMOB (Music_function, x, 1);
 
   return Music_function::unsmob (x)->get_function ();
 }
@@ -13,7 +13,7 @@ LY_DEFINE (ly_music_function_signature, "ly:music-function-signature", 1, 0, 0,
            (SCM x),
            "Return the function signature inside@tie{}@var{x}.")
 {
-  LY_ASSERT_TYPE (Music_function::unsmob, x, 1);
+  LY_ASSERT_SMOB (Music_function, x, 1);
 
   return Music_function::unsmob (x)->get_signature ();
 }
index 42b6b50950bb013697ef5ac9744a7f7aefff2115..ffd7c5cdd837487d7fee158ce0a5712f93cb8ed2 100644 (file)
@@ -28,7 +28,7 @@ LY_DEFINE (ly_music_length, "ly:music-length",
            "Get the length of music expression @var{mus} and return"
            " it as a @code{Moment} object.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  LY_ASSERT_SMOB (Music, mus, 1);
   Music *sc = Music::unsmob (mus);
   return sc->get_length ().smobbed_copy ();
 }
@@ -39,7 +39,7 @@ LY_DEFINE (ly_music_property, "ly:music-property",
            " @var{mus}.  If no value is found, return @var{val} or"
            " @code{'()} if @var{val} is not specified.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  LY_ASSERT_SMOB (Music, mus, 1);
   return ly_prob_property (mus, sym, val);
 }
 
@@ -48,7 +48,7 @@ LY_DEFINE (ly_music_set_property_x, "ly:music-set-property!",
            "Set property @var{sym} in music expression @var{mus} to"
            " @var{val}.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  LY_ASSERT_SMOB (Music, mus, 1);
 
   return ly_prob_set_property_x (mus, sym, val);
 }
@@ -71,7 +71,7 @@ LY_DEFINE (ly_music_p, "ly:music?",
            1, 0, 0, (SCM obj),
            "Is @var{obj} a music object?")
 {
-  return scm_from_bool (Music::unsmob (obj));
+  return ly_bool2scm (Music::is_smob (obj));
 }
 
 LY_DEFINE (ly_event_p, "ly:event?",
@@ -92,7 +92,7 @@ LY_DEFINE (ly_music_mutable_properties, "ly:music-mutable-properties",
            "  The immutable properties are not available, since they are"
            " constant and initialized by the @code{make-music} function.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  LY_ASSERT_SMOB (Music, mus, 1);
   Music *m = Music::unsmob (mus);
   return m->get_property_alist (true);
 }
@@ -106,7 +106,7 @@ LY_DEFINE (ly_music_list_p, "ly:music-list?",
 
   while (scm_is_pair (lst))
     {
-      if (!Music::unsmob (scm_car (lst)))
+      if (!Music::is_smob (scm_car (lst)))
         return SCM_BOOL_F;
       lst = scm_cdr (lst);
     }
@@ -120,7 +120,7 @@ LY_DEFINE (ly_music_deep_copy, "ly:music-deep-copy",
            " @var{m} may be an arbitrary type; cons cells and music"
            " are copied recursively.")
 {
-  if (Music::unsmob (m))
+  if (Music::is_smob (m))
       return Music::unsmob (m)->clone ()->unprotect ();
   if (scm_is_pair (m))
     {
@@ -147,7 +147,7 @@ LY_DEFINE (ly_music_transpose, "ly:music-transpose",
            "Transpose @var{m} such that central@tie{}C is mapped"
            " to@tie{}@var{p}.  Return@tie{}@var{m}.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, m, 1);
+  LY_ASSERT_SMOB (Music, m, 1);
   LY_ASSERT_SMOB (Pitch, p, 2);
 
   Music *sc = Music::unsmob (m);
@@ -165,8 +165,8 @@ LY_DEFINE (ly_music_compress, "ly:music-compress",
            2, 0, 0, (SCM m, SCM factor),
            "Compress music object@tie{}@var{m} by moment @var{factor}.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, m, 1);
-  LY_ASSERT_TYPE (Moment::unsmob, factor, 2);
+  LY_ASSERT_SMOB (Music, m, 1);
+  LY_ASSERT_SMOB (Moment, factor, 2);
 
   Music *sc = Music::unsmob (m);
   sc->compress (*Moment::unsmob (factor));
@@ -178,8 +178,8 @@ LY_DEFINE (ly_make_music_relative_x, "ly:make-music-relative!",
            "Make @var{music} relative to @var{pitch},"
            " return final pitch.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, music, 1);
-  LY_ASSERT_TYPE (Pitch::unsmob, pitch, 2);
+  LY_ASSERT_SMOB (Music, music, 1);
+  LY_ASSERT_SMOB (Pitch, pitch, 2);
 
   Pitch start = *Pitch::unsmob (pitch);
   Music *m = Music::unsmob (music);
@@ -193,7 +193,7 @@ LY_DEFINE (ly_music_duration_length, "ly:music-duration-length", 1, 0, 0,
            "Extract the duration field from @var{mus} and return the"
            " length.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  LY_ASSERT_SMOB (Music, mus, 1);
   Music *m = Music::unsmob (mus);
 
   Duration *d = Duration::unsmob (m->get_property ("duration"));
@@ -211,7 +211,7 @@ LY_DEFINE (ly_music_duration_compress, "ly:music-duration-compress", 2, 0, 0,
            "Compress @var{mus} by factor @var{fact}, which is a"
            " @code{Moment}.")
 {
-  LY_ASSERT_TYPE (Music::unsmob, mus, 1);
+  LY_ASSERT_SMOB (Music, mus, 1);
   LY_ASSERT_SMOB (Moment, fact, 2);
 
   Music *m = Music::unsmob (mus);
index c19c56a1ae660021bc76f710ed37756ee1af8042..46376ee5ed48c3ce97df4c694cb691d3f7512c15 100644 (file)
@@ -90,7 +90,7 @@ Moment
 Music::get_length () const
 {
   SCM lst = get_property ("length");
-  if (Moment::unsmob (lst))
+  if (Moment::is_smob (lst))
     return *Moment::unsmob (lst);
 
   if (ly_is_procedure (length_callback_))
index 3db7d7010c37a73df72cdc5e827e7a5f954e4f84..e8612d13c0b3063579689d0694fbda8f3911a806 100644 (file)
@@ -281,10 +281,10 @@ New_fingering_engraver::position_scripts (SCM orientations,
       f->set_parent (ft.head_, Y_AXIS);
       f->set_property ("avoid-slur", ly_symbol2scm ("inside"));
       if (hordir == LEFT
-          && Grob::unsmob (ft.head_->get_object ("accidental-grob")))
+          && Grob::is_smob (ft.head_->get_object ("accidental-grob")))
         Side_position_interface::add_support (f,
                                               Grob::unsmob (ft.head_->get_object ("accidental-grob")));
-      else if (Grob::unsmob (ft.head_->get_object ("dot")))
+      else if (Grob::is_smob (ft.head_->get_object ("dot")))
         Side_position_interface::add_support (f,
                                               Grob::unsmob (ft.head_->get_object ("dot")));
 
index dcca364e172b4887e06250670c25afa6ef12a14b..e8eb8012d5448acebf7a3495b725b031817f54d9 100644 (file)
@@ -43,7 +43,7 @@ using namespace std;
 bool
 Note_column::has_rests (Grob *me)
 {
-  return Grob::unsmob (me->get_object ("rest"));
+  return Grob::is_smob (me->get_object ("rest"));
 }
 
 bool
@@ -141,7 +141,7 @@ Note_column::add_head (Grob *me, Grob *h)
     }
   else if (Note_head::has_interface (h))
     {
-      if (Grob::unsmob (me->get_object ("rest")))
+      if (Grob::is_smob (me->get_object ("rest")))
         both = true;
       Pointer_group_interface::add_grob (me, ly_symbol2scm ("note-heads"), h);
     }
index 1b46789e76d28346d49c79182b8072973333863b..f2d2159f773c4858858dd8504628d5408602d543 100644 (file)
@@ -100,7 +100,7 @@ Note_heads_engraver::process_music ()
         {
           SCM scm_tonic = get_property ("tonic");
           Pitch tonic;
-          if (Pitch::unsmob (scm_tonic))
+          if (Pitch::is_smob (scm_tonic))
             tonic = *Pitch::unsmob (scm_tonic);
 
           unsigned int delta = (pit->get_notename () - tonic.get_notename () + 7) % 7;
index 2ab1178472db4049e646ff2dc73088736324d8f3..cd9a3046cb950b2f70865c7743a59ef123e8d45f 100644 (file)
@@ -54,7 +54,7 @@ Note_performer::process_music ()
 
   Pitch transposing;
   SCM prop = get_property ("instrumentTransposition");
-  if (Pitch::unsmob (prop))
+  if (Pitch::is_smob (prop))
     transposing = *Pitch::unsmob (prop);
 
   for (vsize i = 0; i < note_evs_.size (); i++)
index b3d60bb7bf51aa5b4f75a3f2f794bd910781def7..769b22b968f1509f0f348aed7ab04aa40d9a1377 100644 (file)
@@ -101,7 +101,7 @@ Note_spacing_engraver::finalize ()
   Grob *last_spacing = last_spacings_[parent];
 
   if (last_spacing
-      && !Grob_array::unsmob (last_spacing->get_object ("right-items")))
+      && !Grob_array::is_smob (last_spacing->get_object ("right-items")))
     {
       Grob *col = Grob::unsmob (get_property ("currentCommandColumn"));
 
index 471a5be7c16af74f3ea8c68a352af452f233db46..780dd4dfa4ed3477bb81993e63d2d598e5c81f3e 100644 (file)
@@ -297,7 +297,7 @@ Page_layout_problem::add_footnotes_to_lines (SCM lines, int counter, Paper_book
                   in_text_stencil = Text_interface::interpret_markup (layout,
                                                                       props,
                                                                       in_text_annotation);
-                  if (!Stencil::unsmob (in_text_stencil))
+                  if (!Stencil::is_smob (in_text_stencil))
                     in_text_stencil = SCM_EOL;
                   annotation.translate_axis ((footnote_stencil.extent (Y_AXIS)[UP]
                                               + number_raise
@@ -433,7 +433,7 @@ Page_layout_problem::Page_layout_problem (Paper_book *pb, SCM page_scm, SCM syst
       markup_markup_spacing = paper->c_variable ("markup-markup-spacing");
       last_bottom_spacing = paper->c_variable ("last-bottom-spacing");
       top_system_spacing = paper->c_variable ("top-system-spacing");
-      if (scm_is_pair (systems) && Prob::unsmob (scm_car (systems)))
+      if (scm_is_pair (systems) && Prob::is_smob (scm_car (systems)))
         top_system_spacing = paper->c_variable ("top-markup-spacing");
 
       // Note: the page height here does _not_ reserve space for headers and
index f1423ef3b6ee333a2059df02664052c724870749..9cf318416c83218ff0f230a9736af84d4123b1cb 100644 (file)
@@ -285,7 +285,7 @@ Paper_book::book_title ()
                       paper_->self_scm (),
                       scopes);
 
-  if (Stencil::unsmob (tit))
+  if (Stencil::is_smob (tit))
     title = *Stencil::unsmob (tit);
 
   if (!title.is_empty ())
@@ -314,7 +314,7 @@ Paper_book::score_title (SCM header)
                       paper_->self_scm (),
                       scopes);
 
-  if (Stencil::unsmob (tit))
+  if (Stencil::is_smob (tit))
     title = *Stencil::unsmob (tit);
 
   if (!title.is_empty ())
@@ -474,7 +474,7 @@ Paper_book::get_system_specs ()
               if (scm_is_pair (system_specs))
                 set_system_penalty (scm_car (system_specs), header);
 
-              if (Prob::unsmob (title))
+              if (Prob::is_smob (title))
                 {
                   system_specs = scm_cons (title, system_specs);
                   Prob::unsmob (title)->unprotect ();
index 97884e26432f9342824efd2185e682e9c2c3423c..e25e83510d3b2331813c67097fd389b117188892 100644 (file)
@@ -239,7 +239,7 @@ Paper_column_engraver::stop_translation_timestep ()
 
       if (!elem->get_parent (X_AXIS))
         elem->set_parent (col, X_AXIS);
-      if (!Grob::unsmob (elem->get_object ("axis-group-parent-X")))
+      if (!Grob::is_smob (elem->get_object ("axis-group-parent-X")))
         elem->set_object ("axis-group-parent-X", col->self_scm ());
 
       if (Accidental_placement::has_interface (elem)
@@ -279,7 +279,7 @@ Paper_column_engraver::stop_translation_timestep ()
 
   SCM mpos = get_property ("measurePosition");
   SCM barnum = get_property ("internalBarNumber");
-  if (Moment::unsmob (mpos)
+  if (Moment::is_smob (mpos)
       && scm_is_integer (barnum))
     {
       SCM where = scm_cons (barnum,
index c6f8f0d742d6676c22478d9573112b113e18db0d..f6e26ec6a18d6a2eccd94f39240d4a4af6dec7ee 100644 (file)
@@ -288,7 +288,7 @@ Paper_column::print (SCM p)
        scm_is_pair (s); s = scm_cdr (s))
     {
       Spring *sp = Spring::unsmob (scm_caar (s));
-      if (!Grob::unsmob (scm_cdar (s))
+      if (!Grob::is_smob (scm_cdar (s))
           || !Grob::unsmob (scm_cdar (s))->get_system ())
         continue;
 
index 081ff686ae459cc9905fdb0dbf923ef1e3513ebd..40ea72fd2fa4c24eb8b008f12fc80fdbe393315e 100644 (file)
@@ -25,7 +25,7 @@ LY_DEFINE (ly_paper_score_paper_systems, "ly:paper-score-paper-systems",
            "Return vector of @code{paper_system} objects from"
            " @var{paper-score}.")
 {
-  LY_ASSERT_TYPE (Paper_score::unsmob, paper_score, 1);
+  LY_ASSERT_SMOB (Paper_score, paper_score, 1);
 
   Paper_score *pscore = dynamic_cast<Paper_score *> (Music_output::unsmob (paper_score));
   return pscore->get_paper_systems ();
index 388ce46e51a58ba9e44c5f4c794e94df0dc59f26..9b67e651933fa9cc418a39d1852bd808607aa60a 100644 (file)
@@ -444,7 +444,7 @@ toplevel_expression:
                {
                        SCM proc = parser->lexer_->lookup_identifier ("toplevel-text-handler");
                        scm_call_2 (proc, parser->self_scm (), out);
-               } else if (Score::unsmob ($1))
+               } else if (Score::is_smob ($1))
                {
                        SCM proc = parser->lexer_->lookup_identifier ("toplevel-score-handler");
                        scm_call_2 (proc, parser->self_scm (), $1);
@@ -583,9 +583,9 @@ embedded_lilypond:
        | multiplied_duration
        | music_embedded music_embedded music_list {
                $3 = scm_reverse_x ($3, SCM_EOL);
-               if (Music::unsmob ($2))
+               if (Music::is_smob ($2))
                        $3 = scm_cons ($2, $3);
-               if (Music::unsmob ($1))
+               if (Music::is_smob ($1))
                        $3 = scm_cons ($1, $3);
                $$ = MAKE_SYNTAX ("sequential-music", @$, $3);
        }
@@ -747,7 +747,7 @@ context_def_spec_body:
                                $$ = Context_def::make_scm ();
                                td = Context_def::unsmob ($$);
                        }
-                       if (Music::unsmob ($2)) {
+                       if (Music::is_smob ($2)) {
                                SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler");
                                $2 = scm_call_2 (proc, parser->self_scm (), $2);
                        }
@@ -828,7 +828,7 @@ book_body:
                {
                        SCM proc = parser->lexer_->lookup_identifier ("book-text-handler");
                        scm_call_2 (proc, $1, out);
-               } else if (Score::unsmob ($2))
+               } else if (Score::is_smob ($2))
                {
                        SCM proc = parser->lexer_->lookup_identifier ("book-score-handler");
                        scm_call_2 (proc, $1, $2);
@@ -909,7 +909,7 @@ bookpart_body:
                {
                        SCM proc = parser->lexer_->lookup_identifier ("bookpart-text-handler");
                        scm_call_2 (proc, $1, out);
-               } else if (Score::unsmob ($2))
+               } else if (Score::is_smob ($2))
                {
                        SCM proc = parser->lexer_->lookup_identifier ("bookpart-score-handler");
                        scm_call_2 (proc, $1, $2);
@@ -950,7 +950,7 @@ score_block:
 
 score_body:
        score_items {
-               if (!Score::unsmob ($1)) {
+               if (!Score::is_smob ($1)) {
                        parser->parser_error (@1, _("Missing music in \\score"));
                        $$ = (new Score)->unprotect ();
                        if (scm_is_pair ($1) && ly_is_module (scm_car ($1)))
@@ -992,12 +992,12 @@ score_items:
                                od = 0;
                                $2 = SCM_UNSPECIFIED;
                        }
-               } else if (!Score::unsmob ($$)) {
-                       if (Music::unsmob ($2)) {
+               } else if (!Score::is_smob ($$)) {
+                       if (Music::is_smob ($2)) {
                                SCM scorify = ly_lily_module_constant ("scorify-music");
                                $2 = scm_call_2 (scorify, $2, parser->self_scm ());
                        }
-                       if (Score::unsmob ($2))
+                       if (Score::is_smob ($2))
                        {
                                $$ = $2;
                                $2 = SCM_UNSPECIFIED;
@@ -1137,10 +1137,10 @@ output_def_body:
                        } else
                                $1 = scm_car ($1);
                }
-               if (Context_def::unsmob ($2))
+               if (Context_def::is_smob ($2))
                        assign_context_def (Output_def::unsmob ($1), $2);
                // Seems unlikely, but let's be complete:
-               else if (Music::unsmob ($2))
+               else if (Music::is_smob ($2))
                {
                        SCM proc = parser->lexer_->lookup_identifier
                                ("output-def-music-handler");
@@ -1165,7 +1165,7 @@ output_def_body:
        } music_or_context_def
        {
                parser->lexer_->pop_state ();
-               if (Context_def::unsmob ($3))
+               if (Context_def::is_smob ($3))
                        assign_context_def (Output_def::unsmob ($1), $3);
                else {
 
@@ -1201,7 +1201,7 @@ music_list:
                $$ = SCM_EOL;
        }
        | music_list music_embedded {
-               if (Music::unsmob ($2))
+               if (Music::is_smob ($2))
                        $$ = scm_cons ($2, $1);
        }
        | music_list error {
@@ -1229,7 +1229,7 @@ pitch_as_music:
        pitch_or_music
        {
                $$ = make_music_from_simple (parser, @1, $1);
-                if (!Music::unsmob ($$))
+                if (!Music::is_smob ($$))
                {
                         parser->parser_error (@1, _ ("music expected"));
                        $$ = MAKE_SYNTAX ("void-music", @$);
@@ -1351,11 +1351,11 @@ context_modification:
         }
        | WITH context_modification_arg
        {
-               if (Music::unsmob ($2)) {
+               if (Music::is_smob ($2)) {
                        SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler");
                        $2 = scm_call_2 (proc, parser->self_scm (), $2);
                }
-               if (Context_mod::unsmob ($2))
+               if (Context_mod::is_smob ($2))
                        $$ = $2;
                else {
                        parser->parser_error (@2, _ ("not a context mod"));
@@ -1395,11 +1395,11 @@ context_mod_list:
        | context_mod_list context_mod_arg {
                if (scm_is_eq ($2, SCM_UNSPECIFIED))
                        ;
-               else if (Music::unsmob ($2)) {
+               else if (Music::is_smob ($2)) {
                        SCM proc = parser->lexer_->lookup_identifier ("context-mod-music-handler");
                        $2 = scm_call_2 (proc, parser->self_scm (), $2);
                }
-               if (Context_mod::unsmob ($2))
+               if (Context_mod::is_smob ($2))
                        Context_mod::unsmob ($$)->add_context_mods
                                (Context_mod::unsmob ($2)->get_mods ());
                else {
@@ -3257,7 +3257,7 @@ pitch_or_music:
                if (!parser->lexer_->is_chord_state ())
                         parser->parser_error (@1, _ ("have to be in Chord mode for chords"));
                if (scm_is_pair ($2)) {
-                       if (Pitch::unsmob ($1))
+                       if (Pitch::is_smob ($1))
                                $1 = make_chord_elements (@1,
                                                          $1,
                                                          parser->default_duration_.smobbed_copy (),
@@ -3266,7 +3266,7 @@ pitch_or_music:
                        SCM elts = ly_append2 ($1, scm_reverse_x ($2, SCM_EOL));
 
                        $$ = MAKE_SYNTAX ("event-chord", @1, elts);
-               } else if (!Pitch::unsmob ($1))
+               } else if (!Pitch::is_smob ($1))
                        $$ = MAKE_SYNTAX ("event-chord", @1, $1);
                // A mere pitch drops through.
        } %prec ':'
@@ -3709,7 +3709,7 @@ otherwise, we have to import music classes into the lexer.
 int
 Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
 {
-       if (Book::unsmob (sid)) {
+       if (Book::is_smob (sid)) {
                Book *book =  Book::unsmob (sid)->clone ();
                *destination = book->self_scm ();
                book->unprotect ();
@@ -3718,11 +3718,11 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
        } else if (scm_is_number (sid)) {
                *destination = sid;
                return NUMBER_IDENTIFIER;
-       } else if (Context_def::unsmob (sid))
+       } else if (Context_def::is_smob (sid))
        {
                *destination = Context_def::unsmob (sid)->clone ()->unprotect ();
                return SCM_IDENTIFIER;
-        } else if (Context_mod::unsmob (sid)) {
+        } else if (Context_mod::is_smob (sid)) {
                 *destination = Context_mod::unsmob (sid)->smobbed_copy ();
                 return CONTEXT_MOD_IDENTIFIER;
        } else if (Music *mus = Music::unsmob (sid)) {
@@ -3731,16 +3731,16 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
                bool is_event = mus->is_mus_type ("post-event");
                mus->unprotect ();
                return is_event ? EVENT_IDENTIFIER : MUSIC_IDENTIFIER;
-       } else if (Pitch::unsmob (sid)) {
+       } else if (Pitch::is_smob (sid)) {
                *destination = Pitch::unsmob (sid)->smobbed_copy ();
                return PITCH_IDENTIFIER;
-       } else if (Duration::unsmob (sid)) {
+       } else if (Duration::is_smob (sid)) {
                *destination = Duration::unsmob (sid)->smobbed_copy ();
                return DURATION_IDENTIFIER;
-       } else if (Output_def::unsmob (sid)) {
+       } else if (Output_def::is_smob (sid)) {
                *destination = Output_def::unsmob (sid)->clone ()->unprotect ();
                return SCM_IDENTIFIER;
-       } else if (Score::unsmob (sid)) {
+       } else if (Score::is_smob (sid)) {
                *destination = Score::unsmob (sid)->clone ()->unprotect ();
                return SCM_IDENTIFIER;
        }
@@ -3877,7 +3877,7 @@ is_regular_identifier (SCM id, bool multiple)
 SCM
 make_music_from_simple (Lily_parser *parser, Input loc, SCM simple)
 {
-       if (Music::unsmob (simple))
+       if (Music::is_smob (simple))
                return simple;
        if (parser->lexer_->is_note_state ()) {
                if (scm_is_symbol (simple)) {
@@ -3886,7 +3886,7 @@ make_music_from_simple (Lily_parser *parser, Input loc, SCM simple)
                        n->set_property ("drum-type", simple);
                        return n->unprotect ();
                }
-               if (Pitch::unsmob (simple)) {
+               if (Pitch::is_smob (simple)) {
                        Music *n = MY_MAKE_MUSIC ("NoteEvent", loc);
                        n->set_property ("duration", parser->default_duration_.smobbed_copy ());
                        n->set_property ("pitch", simple);
@@ -3898,7 +3898,7 @@ make_music_from_simple (Lily_parser *parser, Input loc, SCM simple)
                        return MAKE_SYNTAX ("lyric-event", loc, simple,
                                            parser->default_duration_.smobbed_copy ());
        } else if (parser->lexer_->is_chord_state ()) {
-               if (Pitch::unsmob (simple))
+               if (Pitch::is_smob (simple))
                        return MAKE_SYNTAX
                                ("event-chord",
                                 loc,
index 874f44038c6c17d717f5aa3d90a6d17bb7ff1d4d..e1c31a41465b1acdbbe262e8326a329661be81ca 100644 (file)
@@ -23,7 +23,7 @@ LY_DEFINE (ly_performance_write, "ly:performance-write",
            2, 0, 0, (SCM performance, SCM filename),
            "Write @var{performance} to @var{filename}.")
 {
-  LY_ASSERT_TYPE (Performance::unsmob, performance, 1);
+  LY_ASSERT_SMOB (Performance, performance, 1);
   LY_ASSERT_TYPE (scm_is_string, filename, 2);
 
   Performance::unsmob (performance)->write_output (ly_scm2string (filename));
index 40f1fc9bd23bb575b4e3fb7ccc560cf096f08e9b..68897e2987aaae5cd13b90c08c38265f919762a8 100644 (file)
@@ -88,7 +88,7 @@ Pitched_trill_engraver::acknowledge_trill_spanner (Grob_info info)
   if (ev
       && ev->in_event_class ("trill-span-event")
       && to_dir (ev->get_property ("span-direction")) == START
-      && Pitch::unsmob (ev->get_property ("pitch")))
+      && Pitch::is_smob (ev->get_property ("pitch")))
     make_trill (ev);
 }
 
index 930fe7175bee5daf20b9fa8e125dc1c2ddc3766c..42ff535f54fe67c01d17477578f0fd3f8bcea69b 100644 (file)
@@ -24,9 +24,9 @@ LY_DEFINE (ly_pointer_group_interface__add_grob, "ly:pointer-group-interface::ad
            3, 0, 0, (SCM grob, SCM sym, SCM grob_element),
            "Add @var{grob-element} to @var{grob}'s @var{sym} grob array.")
 {
-  LY_ASSERT_TYPE (Grob::unsmob, grob, 1);
+  LY_ASSERT_SMOB (Grob, grob, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
-  LY_ASSERT_TYPE (Grob::unsmob, grob_element, 3);
+  LY_ASSERT_SMOB (Grob, grob_element, 3);
 
   Pointer_group_interface::add_grob (Grob::unsmob (grob),
                                      sym,
index 490ae2f0c5361781c2c46a4bb2f0ba0c467b272d..8829529b7ae77d29893e79ac4c8331f67e58126d 100644 (file)
@@ -62,7 +62,7 @@ Prob::equal_p (SCM sa, SCM sb)
           SCM aval = scm_cdar (aprop);
           SCM bval = scm_cdar (bprop);
           if (scm_caar (aprop) != scm_caar (bprop)
-              || (!(Input::unsmob (aval) && Input::unsmob (bval))
+              || (!(Input::is_smob (aval) && Input::is_smob (bval))
                   &&
                   !to_boolean (scm_equal_p (aval, bval))))
             return SCM_BOOL_F;
index fc3f238e3bd32d92d84a0e9a6f3a9f2c8a95ce6b..a24c761480fffc4373b8a48ddec7b0e5693354f6 100644 (file)
@@ -42,7 +42,7 @@ Pure_from_neighbor_interface::calc_pure_relevant_grobs (SCM smob)
   new_elts.insert (new_elts.end (), elts.begin (), elts.end ());
 
   SCM neighbors_scm = me->get_object ("neighbors");
-  if (Grob_array::unsmob (neighbors_scm))
+  if (Grob_array::is_smob (neighbors_scm))
     {
       vector<Grob *> &arr
         = Grob_array::unsmob (neighbors_scm)->array_reference ();
index 1944b537e18cfeef68b53ea27eab7c483d1d7679..d946f2964ad511fdf596076bab71910d73cca2d1 100644 (file)
@@ -80,7 +80,7 @@ Scheme_hash_table::mark_smob ()
 int
 Scheme_hash_table::print_smob (SCM s, SCM p, scm_print_state *)
 {
-  assert (unsmob (s));
+  assert (is_smob (s));
   scm_puts ("#<Scheme_hash_table  ", p);
   Scheme_hash_table *me = (Scheme_hash_table *) SCM_CELL_WORD_1 (s);
   scm_display (me->hash_tab_, p);
index 88d87e9aebe539da46ed3206f6acfaa978493f25..6ebad7db9dc1a7e822abc53016d6d1f732d9f6a1 100644 (file)
@@ -154,7 +154,7 @@ Score::book_rendering (Output_def *layoutbook,
 void
 Score::set_music (SCM music)
 {
-  if (Music::unsmob (music_))
+  if (Music::is_smob (music_))
     {
       Music::unsmob (music)->origin ()->error (_ ("already have music in score"));
       Music::unsmob (music_)->origin ()->error (_ ("this is the previous music"));
index cb77eda02f433fd63c822798adb791cfb1e644e7..ee4b94570a40c3c70c2def87eb7c5e1107545a84 100644 (file)
@@ -212,7 +212,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
                                           pure,
                                           start,
                                           end);
-  if (Skyline_pair::unsmob (skyp))
+  if (Skyline_pair::is_smob (skyp))
     {
       // for spanner pure heights, we don't know horizontal spacing,
       // so a spanner can never have a meaningful x coordiante
@@ -271,7 +271,7 @@ Side_position_interface::aligned_side (Grob *me, Axis a, bool pure, int start, i
                                                 start,
                                                 end);
 
-           if (Skyline_pair::unsmob (sp))
+           if (Skyline_pair::is_smob (sp))
              {
                Real xc = pure && dynamic_cast<Spanner *> (e)
                          ? e->get_parent (X_AXIS)->relative_coordinate (common[X_AXIS], X_AXIS)
index a4204cddc4e381a7bd68f886af5da850fd5224c9..74845f58599f2965a110657b9e02296f38b29a11 100644 (file)
@@ -50,7 +50,7 @@ evaluate_with_simple_closure (SCM delayed_argument,
   if (Simple_closure *sc = Simple_closure::unsmob (expr))
     {
       SCM inside = sc->expression ();
-      SCM proc = !pure && Unpure_pure_container::unsmob (scm_car (inside))
+      SCM proc = !pure && Unpure_pure_container::is_smob (scm_car (inside))
         ? Unpure_pure_container::unsmob (scm_car (inside))->unpure_part ()
         : scm_car (inside);
       SCM args = scm_cons (delayed_argument,
@@ -66,10 +66,10 @@ evaluate_with_simple_closure (SCM delayed_argument,
     return expr;
   else if (scm_car (expr) == ly_symbol2scm ("quote"))
     return scm_cadr (expr);
-  else if (Unpure_pure_container::unsmob (scm_car (expr))
+  else if (Unpure_pure_container::is_smob (scm_car (expr))
            || ly_is_procedure (scm_car (expr)))
     {
-      SCM proc = !pure && Unpure_pure_container::unsmob (scm_car (expr))
+      SCM proc = !pure && Unpure_pure_container::is_smob (scm_car (expr))
         ? Unpure_pure_container::unsmob (scm_car (expr))->unpure_part ()
         : scm_car (expr);
       SCM args = evaluate_args (delayed_argument, scm_cdr (expr), pure, start, end);
index 9313437279b6732666c1cc99f301450c79ed0626..d0184b5ebc1169a891be9b79e0e56c166b201798 100644 (file)
@@ -219,7 +219,7 @@ Slur::replace_breakable_encompass_objects (Grob *me)
     }
 
   SCM encompass_scm = me->get_object ("encompass-objects");
-  if (Grob_array::unsmob (encompass_scm))
+  if (Grob_array::is_smob (encompass_scm))
     {
       vector<Grob *> &arr
         = Grob_array::unsmob (encompass_scm)->array_reference ();
index 0153e6d804009f4972e772d921df7b87bfb5a960..278e8dabeaa2f167449ea6457987a8a88b895fac 100644 (file)
@@ -86,7 +86,7 @@ Spaceable_grob::get_spring (Grob *this_col, Grob *next_col)
     {
       if (scm_is_pair (scm_car (s))
           && Grob::unsmob (scm_cdar (s)) == next_col
-          && Spring::unsmob (scm_caar (s)))
+          && Spring::is_smob (scm_caar (s)))
         spring = Spring::unsmob (scm_caar (s));
     }
 
index 53b9de3a2c9fc502adf0fac4f4a59f7638a04162..282ceae729714be9af486664f9239d04c95a3dfa 100644 (file)
@@ -111,7 +111,7 @@ Spacing_spanner::note_spacing (Grob * /* me */,
   Moment shortest_playing_len = 0;
   SCM s = lc->get_property ("shortest-playing-duration");
 
-  if (Moment::unsmob (s))
+  if (Moment::is_smob (s))
     shortest_playing_len = *Moment::unsmob (s);
 
   if (! shortest_playing_len.to_bool ())
index efefddba893729dab17a0fb5abe24f05c6d77b2c..9796a897ecffb6ce95b68d05e9713dcb12aa4d7f 100644 (file)
@@ -304,9 +304,9 @@ Spacing_spanner::set_implicit_neighbor_columns (vector<Grob *> const &cols)
       if (!Paper_column::is_breakable (it) && !Paper_column::is_musical (it))
         continue;
 
-      if (i && !Grob::unsmob (cols[i]->get_object ("left-neighbor")))
+      if (i && !Grob::is_smob (cols[i]->get_object ("left-neighbor")))
         cols[i]->set_object ("left-neighbor", cols[i - 1]->self_scm ());
-      if (i + 1 < cols.size () && !Grob::unsmob (cols[i]->get_object ("right-neighbor")))
+      if (i + 1 < cols.size () && !Grob::is_smob (cols[i]->get_object ("right-neighbor")))
         cols[i]->set_object ("right-neighbor", cols[i + 1]->self_scm ());
     }
 }
index b0d43ec8bb86fad20be2775b6430f71f1bdff72b..510154cd84f7266cb89126392bfec9452fcb9624 100644 (file)
@@ -204,7 +204,7 @@ Spacing_engraver::stop_translation_timestep ()
   ->set_object ("spacing", spacing_->self_scm ());
 
   SCM proportional = get_property ("proportionalNotationDuration");
-  if (Moment::unsmob (proportional))
+  if (Moment::is_smob (proportional))
     {
       musical_column->set_property ("shortest-playing-duration", proportional);
       musical_column->set_property ("shortest-starter-duration", proportional);
index 4c77ccc01a3fc09442bb774788a98ee4e2797b38..cee8c535f0730056389ff4515fd67a3a064a63cf 100644 (file)
@@ -26,7 +26,7 @@ LY_DEFINE (ly_spanner_bound, "ly:spanner-bound",
            "Get one of the bounds of @var{spanner}.  @var{dir} is @w{@code{-1}}"
            " for left, and @code{1} for right.")
 {
-  LY_ASSERT_TYPE (Spanner::unsmob, spanner, 1);
+  LY_ASSERT_SMOB (Spanner, spanner, 1);
   LY_ASSERT_TYPE (is_direction, dir, 2);
   Item *bound = Spanner::unsmob (spanner)->get_bound (to_dir (dir));
   return bound ? bound->self_scm () : SCM_EOL;
@@ -37,9 +37,9 @@ LY_DEFINE (ly_spanner_set_bound_x, "ly:spanner-set-bound!",
            "Set grob @var{item} as bound in direction @var{dir} for"
            " @var{spanner}.")
 {
-  LY_ASSERT_TYPE (Spanner::unsmob, spanner, 1);
+  LY_ASSERT_SMOB (Spanner, spanner, 1);
   LY_ASSERT_TYPE (is_direction, dir, 2);
-  LY_ASSERT_TYPE (Item::unsmob, item, 3);
+  LY_ASSERT_SMOB (Item, item, 3);
 
   Spanner::unsmob (spanner)->set_bound (to_dir (dir), Item::unsmob (item));
   return SCM_UNSPECIFIED;
index 85204b09d67d9adbe89a5ea097f987e4615080fd..bf69688a9c45b16f4b0e175bb988f9989f799571 100644 (file)
@@ -173,7 +173,7 @@ void
 Stem_engraver::kill_unused_flags ()
 {
   for (vsize i = 0; i < maybe_flags_.size (); i++)
-    if (Grob::unsmob (maybe_flags_[i]->get_parent (X_AXIS)->get_object ("beam")))
+    if (Grob::is_smob (maybe_flags_[i]->get_parent (X_AXIS)->get_object ("beam")))
       maybe_flags_[i]->suicide ();
 }
 
index b5d9f829acef0fb698e5fcafe003381bfe7328d4..5e828fa84292902d948542e3fa7cabd243b2a5bc 100644 (file)
@@ -456,7 +456,7 @@ Stem::internal_calc_stem_end_position (Grob *me, bool calc_beam)
 
   /* Tremolo stuff.  */
   Grob *t_flag = Grob::unsmob (me->get_object ("tremolo-flag"));
-  if (t_flag && (!Grob::unsmob (me->get_object ("beam")) || !calc_beam))
+  if (t_flag && (!Grob::is_smob (me->get_object ("beam")) || !calc_beam))
     {
       /* Crude hack: add extra space if tremolo flag is there.
 
@@ -724,7 +724,7 @@ Stem::internal_height (Grob *me, bool calc_beam)
     If there is a beam but no stem, slope calculations depend on this
     routine to return where the stem end /would/ be.
   */
-  if (calc_beam && !beam && !Stencil::unsmob (me->get_property ("stencil")))
+  if (calc_beam && !beam && !Stencil::is_smob (me->get_property ("stencil")))
     return Interval ();
 
   Real y1 = robust_scm2double ((calc_beam
@@ -837,7 +837,7 @@ SCM
 Stem::calc_length (SCM smob)
 {
   Grob *me = Grob::unsmob (smob);
-  if (Grob::unsmob (me->get_object ("beam")))
+  if (Grob::is_smob (me->get_object ("beam")))
     {
       me->programming_error ("ly:stem::calc-length called but will not be used for beamed stem.");
       return scm_from_double (0.0);
index 7ac17dac408ee2051fcab589cad8ac492b2edd9b..52538d47425601a6dbadbb79a4001411e12212c2 100644 (file)
@@ -23,7 +23,7 @@ LY_DEFINE (ly_stream_event_p, "ly:stream-event?",
            1, 0, 0, (SCM obj),
            "Is @code{@var{obj}} a @code{Stream_event} object?")
 {
-  return scm_from_bool (Stream_event::unsmob (obj));
+  return scm_from_bool (Stream_event::is_smob (obj));
 }
 
 LY_DEFINE (ly_make_stream_event, "ly:make-stream-event",
@@ -49,7 +49,7 @@ LY_DEFINE (ly_event_property, "ly:event-property",
            "  If @var{sym} is undefined, return @var{val} or"
            " @code{'()} if @var{val} is not specified.")
 {
-  LY_ASSERT_TYPE (Stream_event::unsmob, sev, 1)
+  LY_ASSERT_SMOB (Stream_event, sev, 1)
   return ly_prob_property (sev, sym, val);
 }
 
@@ -57,7 +57,7 @@ LY_DEFINE (ly_event_set_property_x, "ly:event-set-property!",
            3, 0, 0, (SCM ev, SCM sym, SCM val),
            "Set property @var{sym} in event @var{ev} to @var{val}.")
 {
-  LY_ASSERT_TYPE (Stream_event::unsmob, ev, 1);
+  LY_ASSERT_SMOB (Stream_event, ev, 1);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   return ly_prob_set_property_x (ev, sym, val);
index e17d6c711b1806b5417b1f7e5ac33510503b79db..95dc13f16ea90f94619b03dcb444b1eeb03a93f2 100644 (file)
@@ -86,8 +86,8 @@ Stream_event::make_transposable ()
       SCM prop = scm_car (entry);
       SCM val = scm_cdr (entry);
 
-      if ((Pitch::unsmob (val)
-           || (prop == ly_symbol2scm ("element") && Music::unsmob (val))
+      if ((Pitch::is_smob (val)
+           || (prop == ly_symbol2scm ("element") && Music::is_smob (val))
            || (prop == ly_symbol2scm ("elements") && scm_is_pair (val))
            || (prop == ly_symbol2scm ("pitch-alist") && scm_is_pair (val)))
           && scm_is_false (scm_assq (prop, mutable_property_alist_)))
index 410b0b6a4129c91bcf68569a6bec2004946ffba5..01ecb4c3a0fb22814915c9b152d1a7821861f6c1 100644 (file)
@@ -61,7 +61,7 @@ void
 Tempo_performer::process_music ()
 {
   SCM w = get_property ("tempoWholesPerMinute");
-  if (Moment::unsmob (w)
+  if (Moment::is_smob (w)
       && !ly_is_equal (w, last_tempo_))
     {
       Rational r = Moment::unsmob (w)->main_part_;
index b2a138e1a68b283a3465da295aecd4abdce48aa0..8a93da72274c9e55ac48fdd3a33296c9da2f7af6 100644 (file)
@@ -161,7 +161,7 @@ Tie::calc_direction (SCM smob)
   Grob *yparent = me->get_parent (Y_AXIS);
   if ((Tie_column::has_interface (yparent)
        || Semi_tie_column::has_interface (yparent))
-      && Grob_array::unsmob (yparent->get_object ("ties"))
+      && Grob_array::is_smob (yparent->get_object ("ties"))
       //      && Grob_array::unsmob (yparent->get_object ("ties"))->size () > 1
      )
     {
@@ -223,7 +223,7 @@ Tie::calc_control_points (SCM smob)
   Grob *yparent = me->get_parent (Y_AXIS);
   if ((Tie_column::has_interface (yparent)
        || Semi_tie_column::has_interface (yparent))
-      && Grob_array::unsmob (yparent->get_object ("ties")))
+      && Grob_array::is_smob (yparent->get_object ("ties")))
     {
       extract_grob_set (yparent, "ties", ties);
       if (me->original () && ties.size () == 1
index 4930d35d03933c6fe6651660e602eea9791f5177..e5b8f98c849b998c6b8684b6fbd12d5d83e01037 100644 (file)
@@ -78,7 +78,7 @@ Timing_translator::initialize ()
 
   SCM measureLength = timing->get_property ("measureLength");
 
-  if (!Moment::unsmob (measureLength))
+  if (!Moment::is_smob (measureLength))
     {
       measureLength =
         Moment (ly_scm2rational
@@ -115,7 +115,7 @@ Timing_translator::initialize ()
   context ()->set_property ("beamExceptions", beamExceptions);
 
   SCM baseMoment = timing->get_property ("baseMoment");
-  if (!Moment::unsmob (baseMoment))
+  if (!Moment::is_smob (baseMoment))
     {
       baseMoment =
         Moment (ly_scm2rational
@@ -147,7 +147,7 @@ Rational
 Timing_translator::measure_length () const
 {
   SCM l = get_property ("measureLength");
-  if (Moment::unsmob (l))
+  if (Moment::is_smob (l))
     return Moment::unsmob (l)->main_part_;
   else
     return Rational (1);
@@ -181,7 +181,7 @@ Timing_translator::start_translation_timestep ()
   Moment measposp;
 
   SCM s = get_property ("measurePosition");
-  if (Moment::unsmob (s))
+  if (Moment::is_smob (s))
     measposp = *Moment::unsmob (s);
   else
     {
index 5f5e12aeba0796e11f7757a85e717dbd42e0d00d..111b61f138b651df4e90fd09655d10b73bf46b99 100644 (file)
@@ -101,7 +101,7 @@ filter_performers (SCM ell)
   SCM *tail = &ell;
   for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
     {
-      if (Performer::unsmob (scm_car (*tail)))
+      if (Performer::is_smob (scm_car (*tail)))
         *tail = scm_cdr (*tail);
       else
         tail = SCM_CDRLOC (*tail);
@@ -115,7 +115,7 @@ filter_engravers (SCM ell)
   SCM *tail = &ell;
   for (SCM p = ell; scm_is_pair (p); p = scm_cdr (p))
     {
-      if (Engraver::unsmob (scm_car (*tail)))
+      if (Engraver::is_smob (scm_car (*tail)))
         *tail = scm_cdr (*tail);
       else
         tail = SCM_CDRLOC (*tail);
index 0eca57010ceb765a268f03bbd581a3926d37cc6d..188496c0dde19dde03911eac2cbe7d152cb2ef9e 100644 (file)
@@ -651,7 +651,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
 
           // assume that if a script is avoiding slurs, it should not get placed
           // under a tuplet bracket
-          if (Grob::unsmob (scripts[i]->get_object ("slur")))
+          if (Grob::is_smob (scripts[i]->get_object ("slur")))
             continue;
 
           Interval script_x (scripts[i]->extent (commonx, X_AXIS));
index 7163027ede9e985b54f68a972b0814b7d54cf389..b9872e9f36df7c44c043001c8f541d80c41a2275 100644 (file)
@@ -42,7 +42,7 @@ Unfolded_repeat_iterator::get_music_list () const
 
   for (int i = 0; i < rep_count; i++)
     {
-      if (Music::unsmob (body))
+      if (Music::is_smob (body))
         *tail = scm_cons (body, SCM_EOL);
 
       tail = SCM_CDRLOC (*tail);
index 5d5fe38235cf314e9a57f730b55686f94f806fcc..4c07e31fd268336a7544651abf8aec838f60a4a7 100644 (file)
@@ -61,7 +61,7 @@ LY_DEFINE (ly_unpure_pure_container_unpure_part, "ly:unpure-pure-container-unpur
            1, 0, 0, (SCM pc),
            "Return the unpure part of @var{pc}.")
 {
-  LY_ASSERT_TYPE (Unpure_pure_container::unsmob, pc, 1);
+  LY_ASSERT_SMOB (Unpure_pure_container, pc, 1);
   return Unpure_pure_container::unsmob (pc)->unpure_part ();
 }
 
@@ -69,7 +69,7 @@ LY_DEFINE (ly_unpure_pure_container_pure_part, "ly:unpure-pure-container-pure-pa
            1, 0, 0, (SCM pc),
            "Return the pure part of @var{pc}.")
 {
-  LY_ASSERT_TYPE (Unpure_pure_container::unsmob, pc, 1);
+  LY_ASSERT_SMOB (Unpure_pure_container, pc, 1);
   return Unpure_pure_container::unsmob (pc)->pure_part ();
 }
 
index 2a7ee0eac6a1f2b8703aa65d2bdfdce0e9611c62..62968c13e43ede20fd6ec3ad1eb6e9799a2742ee 100644 (file)
@@ -182,7 +182,7 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
   else if (qualifies (i))
     {
       Pointer_group_interface::add_grob (valign_, ly_symbol2scm ("elements"), i.grob ());
-      if (!Grob::unsmob (i.grob ()->get_object ("staff-grouper")))
+      if (!Grob::is_smob (i.grob ()->get_object ("staff-grouper")))
         i.grob ()->set_object ("staff-grouper", valign_->self_scm ());
     }
 }
index f92d8f968f973a068ba4e9541df554892f4ee546..7e7e65cb04d2fff7d3e15d70dc6f7884dbabe387 100644 (file)
@@ -99,7 +99,7 @@ Volta_engraver::process_music ()
       SCM l (get_property ("voltaSpannerDuration"));
       Moment now = now_mom ();
 
-      bool early_stop = Moment::unsmob (l)
+      bool early_stop = Moment::is_smob (l)
                         && *Moment::unsmob (l) <= now - started_mom_;
 
       end = end || early_stop;