X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext-def.cc;h=3258297b49539e2af7ed329eba280fc1b4192e6c;hb=48c0f8c8843785c20f84bd113c6dea1a0c95a70c;hp=5433337f502027701cc63917384991a84403dc14;hpb=0fe24db3936774a8fb913cb14c997036db7aeb1c;p=lilypond.git diff --git a/lily/context-def.cc b/lily/context-def.cc index 5433337f50..3258297b49 100644 --- a/lily/context-def.cc +++ b/lily/context-def.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2000--2014 Han-Wen Nienhuys + Copyright (C) 2000--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -50,7 +50,7 @@ Context_def::Context_def () Input * Context_def::origin () const { - return Input::unsmob (input_location_); + return unsmob (input_location_); } Context_def::Context_def (Context_def const &s) @@ -85,7 +85,7 @@ Context_def::~Context_def () const char Context_def::type_p_name_[] = "ly:context-def?"; int -Context_def::print_smob (SCM port, scm_print_state *) +Context_def::print_smob (SCM port, scm_print_state *) const { scm_puts ("# accepteds; for (SCM s = accepted; scm_is_pair (s); s = scm_cdr (s)) - if (Context_def *t = Context_def::unsmob (find_context_def (odef, + if (Context_def *t = unsmob (find_context_def (odef, scm_car (s)))) accepteds.push_back (t); @@ -289,9 +289,9 @@ Context_def::get_translator_names (SCM user_mod) const if (scm_is_string (arg)) arg = scm_string_to_symbol (arg); - if (ly_symbol2scm ("consists") == tag) + if (scm_is_eq (tag, ly_symbol2scm ("consists"))) l1 = scm_cons (arg, l1); - else if (ly_symbol2scm ("remove") == tag + else if (scm_is_eq (tag, ly_symbol2scm ("remove")) && (scm_is_pair (arg) || ly_is_procedure (arg) || get_translator (arg))) @@ -398,7 +398,7 @@ LY_DEFINE (ly_context_def_lookup, "ly:context-def-lookup", " @samp{property-ops}, @samp{context-name}, @samp{group-type}.") { LY_ASSERT_SMOB (Context_def, def, 1); - Context_def *cd = Context_def::unsmob (def); + Context_def *cd = unsmob (def); LY_ASSERT_TYPE (ly_is_symbol, sym, 2); SCM res = cd->lookup (sym); @@ -422,9 +422,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 = Context_def::unsmob (def)->clone (); + Context_def *cd = unsmob (def)->clone (); - for (SCM s = Context_mod::unsmob (mod)->get_mods (); + for (SCM s = unsmob (mod)->get_mods (); scm_is_pair (s); s = scm_cdr (s)) cd->add_context_mod (scm_car (s));