X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext.cc;h=a614146058f55273bc2070d0976c356d10d346b7;hb=9b94faa34d9d2bd1f6b4a0049e16480d7eb0687e;hp=ef6fecf4b1aa123e566d858c4a576f2c3f45951e;hpb=8cce5dd067a8a2bab508f5abebc3955db8837bbf;p=lilypond.git diff --git a/lily/context.cc b/lily/context.cc index ef6fecf4b1..a614146058 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -49,9 +49,13 @@ Context::check_removal () ctx->check_removal (); if (ctx->is_removable ()) { - recurse_over_translators (ctx, &Translator::finalize, - &Translator_group::finalize, - UP); + recurse_over_translators + (ctx, + Callback0_wrapper::make_smob + (), + Callback0_wrapper::make_smob + (), + UP); send_stream_event (ctx, "RemoveContext", 0, 0); } } @@ -90,8 +94,7 @@ Context::Context () smobify_self (); - Scheme_hash_table *tab = new Scheme_hash_table; - properties_scm_ = tab->unprotect (); + properties_scm_ = Scheme_hash_table::make_smob (); event_source_ = new Dispatcher (); event_source_->unprotect (); events_below_ = new Dispatcher (); @@ -753,6 +756,11 @@ Context::print_smob (SCM port, scm_print_state *) const return 1; } +void +Context::derived_mark () const +{ +} + SCM Context::mark_smob () const { @@ -773,10 +781,12 @@ Context::mark_smob () const if (events_below_) scm_gc_mark (events_below_->self_scm ()); + derived_mark (); + return properties_scm_; } -const char Context::type_p_name_[] = "ly:context?"; +const char * const Context::type_p_name_ = "ly:context?"; Global_context * Context::get_global_context () const