}
void
+Context::internal_set_property (SCM sym, SCM val
#ifndef NDEBUG
-Context::internal_set_property (SCM sym, SCM val, char const *file, int line, char const *fun)
+ , char const *file, int line, char const *fun
+#endif
+ )
{
+#ifndef NDEBUG
+ (void) file;
+ (void) line;
+ (void) fun;
+#endif
+
if (do_internal_type_checking_global)
assert (type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")));
-#else
-Context::internal_set_property (SCM sym, SCM val)
-{
-#endif
properties_dict ()->set (sym, val);
}
Context::remove_context (SCM)
{
/* ugh, the translator group should listen to RemoveContext events by itself */
- implementation ()->disconnect_from_context ();
+ Translator_group *impl = implementation ();
+ if (impl)
+ impl->disconnect_from_context ();
disconnect_from_parent ();
}
scm_gc_mark (me->definition_mods_);
scm_gc_mark (me->properties_scm_);
scm_gc_mark (me->accepts_list_);
+
if (me->implementation_)
scm_gc_mark (me->implementation_->self_scm ());
- if (me->event_source_) scm_gc_mark (me->event_source_->self_scm ());
- if (me->events_below_) scm_gc_mark (me->events_below_->self_scm ());
+
+ if (me->event_source_)
+ scm_gc_mark (me->event_source_->self_scm ());
+
+ if (me->events_below_)
+ scm_gc_mark (me->events_below_->self_scm ());
return me->properties_scm_;
}