bool
Context::is_removable () const
{
- return context_list_ == SCM_EOL && ! iterator_count_
+ return context_list_ == SCM_EOL && ! client_count_
&& !dynamic_cast<Global_context const *> (daddy_context_);
}
{
daddy_context_ = 0;
aliases_ = SCM_EOL;
- iterator_count_ = 0;
+ client_count_ = 0;
implementation_ = 0;
properties_scm_ = SCM_EOL;
accepts_list_ = SCM_EOL;
if (path.size () != 1)
{
- programming_error (_f ("Invalid CreateContext event: Cannot create %s context", type.c_str ()));
+ programming_error (to_string ("Invalid CreateContext event: Cannot create %s context", type.c_str ()));
return;
}
Context_def *cdef = path[0];
void
Context::internal_set_property (SCM sym, SCM val)
{
+ bool type_check_ok = type_check_assignment (sym, val, ly_symbol2scm ("translation-type?"));
+
if (do_internal_type_checking_global)
- assert (type_check_assignment (sym, val, ly_symbol2scm ("translation-type?")));
+ assert (type_check_ok);
- properties_dict ()->set (sym, val);
+ if (type_check_ok)
+ properties_dict ()->set (sym, val);
}
/*