notename_ = notename;
}
-const char Pitch::type_p_name_[] = "ly:pitch?";
+const char * const Pitch::type_p_name_ = "ly:pitch?";
SCM
-Pitch::mark_smob ()
+Pitch::mark_smob () const
{
return scale_->self_scm ();
}
int
-Pitch::print_smob (SCM port, scm_print_state *)
+Pitch::print_smob (SCM port, scm_print_state *) const
{
scm_puts ("#<Pitch ", port);
scm_display (ly_string2scm (to_string ()), port);
SCM
Pitch::equal_p (SCM a, SCM b)
{
- Pitch *p = (Pitch *) SCM_CELL_WORD_1 (a);
- Pitch *q = (Pitch *) SCM_CELL_WORD_1 (b);
+ Pitch *p = unsmob<Pitch> (a);
+ Pitch *q = unsmob<Pitch> (b);
bool eq = p->notename_ == q->notename_
&& p->octave_ == q->octave_
SCM
Pitch::less_p (SCM p1, SCM p2)
{
- Pitch *a = Pitch::unsmob (p1);
- Pitch *b = Pitch::unsmob (p2);
+ Pitch *a = unsmob<Pitch> (p1);
+ Pitch *b = unsmob<Pitch> (p2);
if (compare (*a, *b) < 0)
return SCM_BOOL_T;