X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fscore.cc;h=52a48538b8d8d3cf2630bc77fcfbd66b7cc27aea;hb=830273ee6930479dbf332731ea5243a364c1bd87;hp=99ec51880a3672e5741447a5ff66864544cc1f73;hpb=aa93c901382b55d19a30b601afbdca85ccd16987;p=lilypond.git diff --git a/lily/score.cc b/lily/score.cc index 99ec51880a..52a48538b8 100644 --- a/lily/score.cc +++ b/lily/score.cc @@ -28,13 +28,23 @@ using namespace std; #include "ly-smobs.icc" +Input * +Score::origin () const +{ + return unsmob_input (input_location_); +} + + Score::Score () - : Input () { header_ = SCM_EOL; music_ = SCM_EOL; + input_location_ = SCM_EOL; + error_found_ = false; + smobify_self (); + input_location_ = make_input (Input ()); } Score::~Score () @@ -53,6 +63,8 @@ Score::mark_smob (SCM s) scm_gc_mark (sc->header_); for (vsize i = sc->defs_.size (); i--;) scm_gc_mark (sc->defs_[i]->self_scm ()); + + scm_gc_mark (sc->input_location_); return sc->music_; } @@ -65,12 +77,14 @@ Score::print_smob (SCM, SCM p, scm_print_state*) } Score::Score (Score const &s) - : Input (s) { header_ = SCM_EOL; music_ = SCM_EOL; + input_location_ = SCM_EOL; error_found_ = s.error_found_; + smobify_self (); + input_location_ = make_input (*s.origin ()); Music *m = unsmob_music (s.music_); if (m)