X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fduration.cc;h=880b22c46a3575d1fc37bf78943d45992ca1ba8b;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=afc615cdb04b35de7da997354061e556e6fd7473;hpb=bf090c279f6f8e0ebbffc72d7ee435172dfaddc8;p=lilypond.git diff --git a/lily/duration.cc b/lily/duration.cc index afc615cdb0..880b22c46a 100644 --- a/lily/duration.cc +++ b/lily/duration.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2014 Jan Nieuwenhuizen + Copyright (C) 1997--2015 Jan Nieuwenhuizen Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify @@ -136,16 +136,14 @@ Duration::to_string () const return s; } -const char Duration::type_p_name_[] = "ly:duration?"; +const char * const Duration::type_p_name_ = "ly:duration?"; int -Duration::print_smob (SCM s, SCM port, scm_print_state *) +Duration::print_smob (SCM port, scm_print_state *) const { - Duration *r = (Duration *) SCM_CELL_WORD_1 (s); - scm_puts ("#to_string ()), port); + scm_display (ly_string2scm (to_string ()), port); scm_puts (" >", port); return 1; @@ -154,8 +152,8 @@ Duration::print_smob (SCM s, SCM port, scm_print_state *) SCM Duration::equal_p (SCM a, SCM b) { - Duration *p = (Duration *) SCM_CELL_WORD_1 (a); - Duration *q = (Duration *) SCM_CELL_WORD_1 (b); + Duration *p = unsmob (a); + Duration *q = unsmob (b); bool eq = p->dots_ == q->dots_ && p->durlog_ == q->durlog_