(c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include <stdio.h>
+
+#include "global-context.hh"
+
+#include <cstdio>
#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"));
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);
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<Score_context*> (c);
sc->prepare (w);