]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4135/1: Don't use ASSERT_LIVE_IS_ALLOWED in simple smobs
authorDavid Kastrup <dak@gnu.org>
Sat, 27 Sep 2014 11:27:45 +0000 (13:27 +0200)
committerDavid Kastrup <dak@gnu.org>
Thu, 2 Oct 2014 10:07:09 +0000 (12:07 +0200)
When replacing mark_smob with a proper member function, use of
ASSERT_LIVE_IS_ALLOWED would require access to self_scm () or similar,
and simple smobs don't link back to their SCM cell.  This only
concerns Skyline and Context_mod, so the loss is not all that
large.

lily/context-mod.cc
lily/include/skyline.hh
lily/skyline.cc

index 398735900c939f108a1ee0f2eccecccb676eca4c..329bb092dcd69861c27ea6ee8c7d5f0e868cb701 100644 (file)
@@ -50,8 +50,6 @@ Context_mod::print_smob (SCM smob, SCM port, scm_print_state *)
 SCM
 Context_mod::mark_smob (SCM smob)
 {
-  ASSERT_LIVE_IS_ALLOWED (smob);
-
   Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
 
   return me->mods_;
index c3309700e68adb564b5f9d64dec2acdcbc62d84f..dd65bec147f3e0408e13a792b6a40483056bc241 100644 (file)
@@ -53,7 +53,6 @@ class Skyline : public Simple_smob<Skyline>
 {
 public:
   static int print_smob (SCM, SCM, scm_print_state *);
-  static SCM mark_smob (SCM);
   static const char type_p_name_[];
 private:
   list<Building> buildings_;
index 6d6b58ca109d6d34cccc347d7d616cccddd743df..40e43ab9ef908ae1002b603d7fb9018ad18139ca 100644 (file)
@@ -863,13 +863,6 @@ Skyline::clear ()
 
 const char Skyline::type_p_name_[] = "ly:skyline?";
 
-SCM
-Skyline::mark_smob (SCM s)
-{
-  ASSERT_LIVE_IS_ALLOWED (s);
-  return SCM_EOL;
-}
-
 int
 Skyline::print_smob (SCM s, SCM port, scm_print_state *)
 {