X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext-mod.cc;h=cb6cf83562fcd64fe5d8303f3ab4ceb2cd56627b;hb=f9e274a49562fcf1db4428fe25c7ddbd7e2c99cd;hp=5fccf6c4d2985f5e865a33fb96f1f5a3d9300192;hpb=66bde51e821e46a8787c745afe818c8535b87096;p=lilypond.git diff --git a/lily/context-mod.cc b/lily/context-mod.cc index 5fccf6c4d2..cb6cf83562 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--2011 Reinhold Kainhofer + Copyright (C) 2010--2012 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 @@ -29,6 +29,11 @@ Context_mod::Context_mod (Context_mod const &s) mods_ = s.mods_; } +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); @@ -40,7 +45,7 @@ Context_mod::print_smob (SCM smob, SCM port, scm_print_state *) Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob); scm_puts ("#mods_, port); + scm_display (me->get_mods (), port); scm_puts (">", port); return 1; } @@ -48,11 +53,10 @@ Context_mod::print_smob (SCM smob, SCM port, scm_print_state *) SCM Context_mod::mark_smob (SCM smob) { - ASSERT_LIVE_IS_ALLOWED (); + ASSERT_LIVE_IS_ALLOWED (smob); Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob); - scm_gc_mark (me->mods_); return me->mods_; }