]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/context-def.cc
Merge branch 'issue4032'
[lilypond.git] / lily / context-def.cc
index fb5657b6ed0aec0520bb0cb19f1e7d48dc92b1dd..4df8e5e1599dae1f96e949e632cd108e331496db 100644 (file)
@@ -50,7 +50,7 @@ Context_def::Context_def ()
 Input *
 Context_def::origin () const
 {
-  return unsmob_input (input_location_);
+  return Input::unsmob (input_location_);
 }
 
 Context_def::Context_def (Context_def const &s)
@@ -241,7 +241,7 @@ Context_def::internal_path_to_acceptable_context (SCM type_sym,
 
   vector<Context_def *> accepteds;
   for (SCM s = accepted; scm_is_pair (s); s = scm_cdr (s))
-    if (Context_def *t = unsmob_context_def (find_context_def (odef,
+    if (Context_def *t = Context_def::unsmob (find_context_def (odef,
                                                                scm_car (s))))
       accepteds.push_back (t);
 
@@ -396,12 +396,15 @@ Context_def::is_alias (SCM sym) const
 
 LY_DEFINE (ly_context_def_lookup, "ly:context-def-lookup",
            2, 1, 0, (SCM def, SCM sym, SCM val),
-           "Return the value of @var{sym} in output definition @var{def}"
-           " (e.g., @code{\\paper}).  If no value is found, return"
-           " @var{val} or @code{'()} if @var{val} is undefined.")
+           "Return the value of @var{sym} in context definition @var{def}"
+           " (e.g., @code{\\Voice}).  If no value is found, return"
+           " @var{val} or @code{'()} if @var{val} is undefined."
+           " @var{sym} can be any of @samp{default-child}, @samp{consists},"
+           " @samp{description}, @samp{aliases}, @samp{accepts},"
+           " @samp{property-ops}, @samp{context-name}, @samp{group-type}.")
 {
   LY_ASSERT_SMOB (Context_def, def, 1);
-  Context_def *cd = unsmob_context_def (def);
+  Context_def *cd = Context_def::unsmob (def);
   LY_ASSERT_TYPE (ly_is_symbol, sym, 2);
 
   SCM res = cd->lookup (sym);
@@ -425,9 +428,9 @@ LY_DEFINE (ly_context_def_modify, "ly:context-def-modify",
   LY_ASSERT_SMOB (Context_def, def, 1);
   LY_ASSERT_SMOB (Context_mod, mod, 2);
 
-  Context_def *cd = unsmob_context_def (def)->clone ();
+  Context_def *cd = Context_def::unsmob (def)->clone ();
 
-  for (SCM s = unsmob_context_mod (mod)->get_mods ();
+  for (SCM s = Context_mod::unsmob (mod)->get_mods ();
        scm_is_pair (s);
        s = scm_cdr (s))
     cd->add_context_mod (scm_car (s));