X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fglobal-context.cc;h=ee26880d4deeb366207740e1d042c1b953850dc2;hb=97ebd8b72cdd2db28ad8eb38629d51f285afff22;hp=869e93622fe1bf6f60fc1c00a11d9bc790eb8eed;hpb=5d09d767066abb2f2d53cd18cf0c0a0b1188d1a7;p=lilypond.git diff --git a/lily/global-context.cc b/lily/global-context.cc index 869e93622f..ee26880d4d 100644 --- a/lily/global-context.cc +++ b/lily/global-context.cc @@ -5,26 +5,25 @@ (c) 1997--2004 Han-Wen Nienhuys */ -#include + +#include "global-context.hh" + +#include #include "warn.hh" -#include "music.hh" #include "event.hh" #include "music-list.hh" #include "music-iterator.hh" -#include "global-context.hh" #include "score-context.hh" #include "context-def.hh" #include "output-def.hh" #include "lilypond-key.hh" -Global_context::Global_context (Output_def *o, Moment final) - : Context (new Lilypond_context_key(0, +Global_context::Global_context (Output_def *o, Moment final, Object_key *key) + : Context (new Lilypond_context_key(key, Moment(0), "Global", "", 0)) { - scm_gc_unprotect_object (key_->self_scm()); - output_def_ = o; final_mom_ = final; definition_ = find_context_def (o, ly_symbol2scm ("Global")); @@ -54,7 +53,7 @@ Global_context::add_moment_to_process (Moment m) if (m < now_mom_) programming_error ("Trying to freeze in time."); - for (int i=0; i < extra_mom_pq_.size (); i++) + for (int i = 0; i < extra_mom_pq_.size (); i++) if (extra_mom_pq_[i] == m) return; extra_mom_pq_.insert (m); @@ -166,7 +165,6 @@ Global_context::run_iterator_on_me (Music_iterator * iter) Object_key const *key = get_context_key ("Score", ""); Context *c = t->instantiate (SCM_EOL, key); add_context (c); - scm_gc_unprotect_object (key->self_scm()); Score_context *sc = dynamic_cast (c); sc->prepare (w);