]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/unpure-pure-container.cc
Merge remote-tracking branch 'origin/translation'
[lilypond.git] / lily / unpure-pure-container.cc
index 05e9c4bcc8ea0d1f1f8db9dee1796f2789f297ba..1aefe920afea8b647496d65bcadcb2baf10d2514 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 2011--2012 Mike Solomon <mike@mikesolomon.org>
+  Copyright (C) 2011--2014 Mike Solomon <mike@mikesolomon.org>
 
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -32,6 +32,17 @@ is_unpure_pure_container (SCM s)
   return (SCM_NIMP (s) && SCM_CELL_TYPE (s) == unpure_pure_container_tag);
 }
 
+bool
+is_unchanging_unpure_pure_container (SCM s)
+// A container that has the same callback for both 'pure' and 'unpure' lookups
+// and which ignores the 'start' and 'end' columnns.
+// Such a callback will give the same answer for tentative or final layouts.
+{
+  LY_ASSERT_TYPE (is_unpure_pure_container, s, 1);
+  SCM pure_part = SCM_SMOB_OBJECT_2 (s);
+  return (SCM_UNBNDP (pure_part));
+}
+
 SCM
 unpure_pure_container_unpure_part (SCM smob)
 {
@@ -137,7 +148,7 @@ void init_unpure_pure_container ()
   unpure_pure_call_tag = scm_make_smob_type ("unpure-pure-call", 0);
   scm_set_smob_mark (unpure_pure_call_tag, scm_markcdr);
   scm_set_smob_apply (unpure_pure_call_tag,
-                      (SCM (*)()) apply_unpure_pure, 2, 0, 1);
+                      (scm_t_subr) apply_unpure_pure, 2, 0, 1);
 };
 
 ADD_SCM_INIT_FUNC (unpure_pure_container, init_unpure_pure_container);