X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext-mod.cc;h=fd2a25d2fe5fc64fec88a7eea3ec34deedc85962;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=2d35e05f836b31278e5a376b8c8d0416c2e07c09;hpb=0b544cfb7332615ef809b71b57ab656741311ae1;p=lilypond.git diff --git a/lily/context-mod.cc b/lily/context-mod.cc index 2d35e05f83..fd2a25d2fe 100644 --- a/lily/context-mod.cc +++ b/lily/context-mod.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2010--2014 Reinhold Kainhofer + Copyright (C) 2010--2015 Reinhold Kainhofer LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,30 +34,21 @@ Context_mod::Context_mod (SCM mod_list) mods_ = scm_reverse (mod_list); } -#include "ly-smobs.icc" -IMPLEMENT_SIMPLE_SMOBS (Context_mod); -IMPLEMENT_DEFAULT_EQUAL_P (Context_mod); -IMPLEMENT_TYPE_P (Context_mod, "ly:context-mod?"); +const char Context_mod::type_p_name_[] = "ly:context-mod?"; int -Context_mod::print_smob (SCM smob, SCM port, scm_print_state *) +Context_mod::print_smob (SCM port, scm_print_state *) { - Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob); - scm_puts ("#get_mods (), port); + scm_display (get_mods (), port); scm_puts (">", port); return 1; } SCM -Context_mod::mark_smob (SCM smob) +Context_mod::mark_smob () { - ASSERT_LIVE_IS_ALLOWED (smob); - - Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob); - - return me->mods_; + return mods_; } void @@ -78,4 +69,3 @@ Context_mod::get_mods () const { return scm_reverse (mods_); } -