]> git.donarmstrong.com Git - lilypond.git/commitdiff
Rectify order of property operations.
authorDavid Kastrup <dak@gnu.org>
Sat, 10 Mar 2012 10:06:20 +0000 (11:06 +0100)
committerDavid Kastrup <dak@gnu.org>
Sat, 10 Mar 2012 11:17:13 +0000 (12:17 +0100)
lily/context-def.cc
lily/context-mod.cc
lily/context-property.cc
lily/context.cc

index 9b9628c6dcf0ea32e6cb9580975131f2eb14a07c..fb8208acdd38b1dc8ace2b76554915a2127e1494 100644 (file)
@@ -326,7 +326,7 @@ Context_def::make_scm ()
 void
 Context_def::apply_default_property_operations (Context *tg)
 {
-  apply_property_operations (tg, property_ops_);
+  apply_property_operations (tg, scm_reverse (property_ops_));
 }
 
 SCM
index a51f7cf71e7ee4ca9afaecb08dfa0b7f7dfa988f..460d18bcfd79222ae0c138f798899a3746e3dfdb 100644 (file)
@@ -45,7 +45,7 @@ Context_mod::print_smob (SCM smob, SCM port, scm_print_state *)
   Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
 
   scm_puts ("#<Context_mod ", port);
-  scm_display (me->mods_, port);
+  scm_display (me->get_mods (), port);
   scm_puts (">", port);
   return 1;
 }
@@ -57,7 +57,6 @@ Context_mod::mark_smob (SCM smob)
 
   Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
 
-  scm_gc_mark (me->mods_);
   return me->mods_;
 }
 
index 11d03c5b0537be35619f173d382fb6cc59aa042b..a9d7e2fc449463e68384fc007b13ad3697709368 100644 (file)
@@ -225,8 +225,7 @@ execute_pushpop_property (Context *context,
 void
 apply_property_operations (Context *tg, SCM pre_init_ops)
 {
-  SCM correct_order = scm_reverse (pre_init_ops);
-  for (SCM s = correct_order; scm_is_pair (s); s = scm_cdr (s))
+  for (SCM s = pre_init_ops; scm_is_pair (s); s = scm_cdr (s))
     {
       SCM entry = scm_car (s);
       SCM type = scm_car (entry);
index be8a62980469199a70d88fc71ba35c089b74f56b..392077861828ea7683644662eb3ff1974afeca38 100644 (file)
@@ -318,7 +318,7 @@ Context::path_to_acceptable_context (SCM name) const
   // The 'accepts elements in definition_mods_ is a list of ('accepts string),
   // but the Context_def expects to see elements of the form ('accepts symbol).
   SCM accepts = SCM_EOL;
-  for (SCM s = scm_reverse (definition_mods_); scm_is_pair (s); s = scm_cdr (s))
+  for (SCM s = definition_mods_; scm_is_pair (s); s = scm_cdr (s))
     if (scm_caar (s) == ly_symbol2scm ("accepts"))
       {
         SCM elt = scm_list_2 (scm_caar (s), scm_string_to_symbol (scm_cadar (s)));
@@ -327,7 +327,7 @@ Context::path_to_acceptable_context (SCM name) const
 
   return unsmob_context_def (definition_)->path_to_acceptable_context (name,
          get_output_def (),
-         accepts);
+        scm_reverse_x (accepts, SCM_EOL));
 
 }