]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/simple-closure.cc
Run grand replace for 2015.
[lilypond.git] / lily / simple-closure.cc
index bfc4b34bb8a3a13d392edf0f9b8fefd639ca3989..e99c8570b79079cb7f965e274c40012c432b95d6 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2005--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 2005--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -50,9 +50,9 @@ evaluate_with_simple_closure (SCM delayed_argument,
   if (Simple_closure *sc = Simple_closure::unsmob (expr))
     {
       SCM inside = sc->expression ();
-      SCM proc = is_unpure_pure_container (scm_car (inside))
-               ? (pure ? scm_car (inside) : unpure_pure_container_unpure_part (scm_car (inside)))
-               : scm_car (inside);
+      SCM proc = !pure && Unpure_pure_container::is_smob (scm_car (inside))
+        ? Unpure_pure_container::unsmob (scm_car (inside))->unpure_part ()
+        : scm_car (inside);
       SCM args = scm_cons (delayed_argument,
                            evaluate_args (delayed_argument, scm_cdr (inside),
                                           pure, start, end));
@@ -66,12 +66,12 @@ evaluate_with_simple_closure (SCM delayed_argument,
     return expr;
   else if (scm_car (expr) == ly_symbol2scm ("quote"))
     return scm_cadr (expr);
-  else if (is_unpure_pure_container (scm_car (expr))
+  else if (Unpure_pure_container::is_smob (scm_car (expr))
            || ly_is_procedure (scm_car (expr)))
     {
-      SCM proc = is_unpure_pure_container (scm_car (expr))
-               ? (pure ? scm_car (expr) : unpure_pure_container_unpure_part (scm_car (expr)))
-               : scm_car (expr);
+      SCM proc = !pure && Unpure_pure_container::is_smob (scm_car (expr))
+        ? Unpure_pure_container::unsmob (scm_car (expr))->unpure_part ()
+        : scm_car (expr);
       SCM args = evaluate_args (delayed_argument, scm_cdr (expr), pure, start, end);
       if (args == SCM_UNSPECIFIED)
         return SCM_UNSPECIFIED;
@@ -114,10 +114,10 @@ LY_DEFINE (ly_eval_simple_closure, "ly:eval-simple-closure",
 }
 
 int
-Simple_closure::print_smob (SCM s, SCM port, scm_print_state *)
+Simple_closure::print_smob (SCM port, scm_print_state *)
 {
   scm_puts ("#<simple-closure ", port);
-  scm_display (scm_cdr (s), port);
+  scm_display (expression (), port);
   scm_puts (" >", port);
   return 1;
 }