]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/duration.hh
Issue 4158: Turn Smob_base<>::print_smob into member functions
[lilypond.git] / lily / include / duration.hh
index e05ed7042ad63c5c6920e40277c58d7e2d26b295..c46d03614b3308b192a4f41d2785da44e40d408a 100644 (file)
 /**
    A musical duration.
 */
-struct Duration
+struct Duration : public Simple_smob<Duration>
 {
-public:
-
+  static SCM equal_p (SCM, SCM);
+  int print_smob (SCM, scm_print_state *);
+  static const char type_p_name_[];
   Duration ();
   Duration (int, int);
   Duration (Rational, bool scale);
@@ -43,7 +44,6 @@ public:
   static int compare (Duration const &, Duration const &);
 
   DECLARE_SCHEME_CALLBACK (less_p, (SCM a, SCM b));
-  DECLARE_SIMPLE_SMOBS (Duration);
 
 private:
   /// Logarithm of the base duration.
@@ -54,9 +54,7 @@ private:
 };
 
 INSTANTIATE_COMPARE (Duration, Duration::compare);
-DECLARE_UNSMOB (Duration, duration);
 
 extern SCM Duration_type_p_proc;
 
 #endif // DURATION_HH
-