]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/undead.cc
Release: bump Welcome versions.
[lilypond.git] / lily / undead.cc
index b29386d2ce839a890c51e8842424a14e0a7bf38f..4aed7a60237f12b21d35e7f0eb5fb4aa122dc939 100644 (file)
 */
 
 #include "smobs.hh"
-#include "ly-smobs.icc"
 
-class Undead
+class Undead : public Simple_smob<Undead>
 {
-  DECLARE_SIMPLE_SMOBS (Undead);
+public:
+  int print_smob (SCM, scm_print_state *) const;
+  SCM mark_smob () const;
+  static const char * const type_p_name_;
+private:
   SCM object_;
 public:
-  SCM object () { return object_; }
+  SCM object () const { return object_; }
   Undead (SCM object = SCM_UNDEFINED) : object_ (object) { };
 };
 
 SCM
-Undead::mark_smob (SCM s)
+Undead::mark_smob () const
 {
   bool saved = parsed_objects_should_be_dead;
   parsed_objects_should_be_dead = false;
-  scm_gc_mark (Undead::unsmob (s)->object ());
+  scm_gc_mark (object ());
   parsed_objects_should_be_dead = saved;
   return SCM_UNDEFINED;
 }
 
 int
-Undead::print_smob (SCM undead,
-                    SCM port,
-                    scm_print_state *)
+Undead::print_smob (SCM port, scm_print_state *) const
 {
   scm_puts ("#<Undead ", port);
-  scm_display (Undead::unsmob (undead)->object (), port);
+  scm_display (object (), port);
   scm_puts (" >", port);
   return 1;
 }
 
-IMPLEMENT_SIMPLE_SMOBS (Undead);
-IMPLEMENT_DEFAULT_EQUAL_P (Undead);
-IMPLEMENT_TYPE_P (Undead, "ly:undead?")
+const char * const Undead::type_p_name_ = "ly:undead?";
 
 LY_DEFINE (ly_make_undead, "ly:make-undead",
            1, 0, 0, (SCM object),
@@ -68,7 +67,7 @@ LY_DEFINE (ly_get_undead, "ly:get-undead",
            "Get back object from @var{undead}.")
 {
   LY_ASSERT_SMOB (Undead, undead, 1);
-  return Undead::unsmob (undead)->object ();
+  return unsmob<Undead> (undead)->object ();
 }
 
 // '