X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpitch.cc;h=9e46bba70e6ff1d2360a66292427f312b4b5f5c8;hb=1478b35691bfdb6e805d7225ee44fbec0622e8fc;hp=8fd4d67171cc2cb5970c0a3fed5464e53f0d8602;hpb=886093b9ffe6b0f1a4a9d7d02ec12242c85b3caa;p=lilypond.git diff --git a/lily/pitch.cc b/lily/pitch.cc index 8fd4d67171..9e46bba70e 100644 --- a/lily/pitch.cc +++ b/lily/pitch.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1998--2014 Han-Wen Nienhuys + Copyright (C) 1998--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -218,20 +218,19 @@ Pitch::down_to (int notename) notename_ = notename; } -const char Pitch::type_p_name_[] = "ly:pitch?"; +const char * const Pitch::type_p_name_ = "ly:pitch?"; + SCM -Pitch::mark_smob (SCM x) +Pitch::mark_smob () const { - Pitch *p = (Pitch *) SCM_CELL_WORD_1 (x); - return p->scale_->self_scm (); + return scale_->self_scm (); } int -Pitch::print_smob (SCM s, SCM port, scm_print_state *) +Pitch::print_smob (SCM port, scm_print_state *) const { - Pitch *r = (Pitch *) SCM_CELL_WORD_1 (s); scm_puts ("#to_string ()), port); + scm_display (ly_string2scm (to_string ()), port); scm_puts (" >", port); return 1; } @@ -253,8 +252,8 @@ MAKE_SCHEME_CALLBACK (Pitch, less_p, 2); SCM Pitch::less_p (SCM p1, SCM p2) { - Pitch *a = Pitch::unsmob (p1); - Pitch *b = Pitch::unsmob (p2); + Pitch *a = unsmob (p1); + Pitch *b = unsmob (p2); if (compare (*a, *b) < 0) return SCM_BOOL_T;