]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Issue 4360: Reorganize smob initialization to make it more reliable
[lilypond.git] / lily / grob.cc
index faca5077b5173b97b7b2e0b14722c556a9ca6853..8cfb14d53974a23d9e3278b52f7b12e47b67e1ca 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -39,6 +39,7 @@
 #include "unpure-pure-container.hh"
 #include "warn.hh"
 
+ADD_SMOB_INIT (Grob);
 
 Grob *
 Grob::clone () const
@@ -75,17 +76,17 @@ Grob::Grob (SCM basicprops)
         }
     }
 
-  if (get_property_data ("X-extent") == SCM_EOL)
+  if (scm_is_null (get_property_data ("X-extent")))
     set_property ("X-extent", Grob::stencil_width_proc);
-  if (get_property_data ("Y-extent") == SCM_EOL)
+  if (scm_is_null (get_property_data ("Y-extent")))
     set_property ("Y-extent",
                   Unpure_pure_container::make_smob (Grob::stencil_height_proc,
                                                     Grob::pure_stencil_height_proc));
-  if (get_property_data ("vertical-skylines") == SCM_EOL)
+  if (scm_is_null (get_property_data ("vertical-skylines")))
     set_property ("vertical-skylines",
                   Unpure_pure_container::make_smob (Grob::simple_vertical_skylines_from_extents_proc,
                                                     Grob::pure_simple_vertical_skylines_from_extents_proc));
-  if (get_property_data ("horizontal-skylines") == SCM_EOL)
+  if (scm_is_null (get_property_data ("horizontal-skylines")))
     set_property ("horizontal-skylines",
                   Unpure_pure_container::make_smob (Grob::simple_horizontal_skylines_from_extents_proc,
                                                     Grob::pure_simple_horizontal_skylines_from_extents_proc));
@@ -818,6 +819,7 @@ ADD_INTERFACE (Grob,
                "meta "
                "minimum-X-extent "
                "minimum-Y-extent "
+               "parenthesis-friends "
                "pure-Y-offset-in-progress "
                "rotation "
                "skyline-horizontal-padding "