]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/page.cc
* lily/parser.yy (book_body): set default bookpaper.
[lilypond.git] / lily / page.cc
index 1052da0d693bab5ea1c479af4efa4079190505b5..3eeba7a5d94f344fea88ed1e06e4a6ffa44f0d8e 100644 (file)
 #include "paper-line.hh"
 #include "stencil.hh"
 #include "warn.hh"
+#include "book-paper-def.hh"
 
 int Page::page_count_ = 0;
 Real Page::MIN_COVERAGE_ = 0.66;
 
+Book_paper_def *
+Page::bookpaper () const
+{
+  return paper_->bookpaper_;
+}
+
 Page::Page (Paper_def *paper, int number)
 {
   copyright_ = SCM_EOL;
@@ -65,6 +72,16 @@ Page::mark_smob (SCM smob)
   Page *p = (Page*) SCM_CELL_WORD_1 (smob);
   scm_gc_mark (p->header_);
   scm_gc_mark (p->footer_);
+
+  if (p->paper_)
+    {
+      scm_gc_mark (p->paper_->self_scm ());
+      if (p->bookpaper ())
+       {
+         scm_gc_mark (p->bookpaper ()->self_scm ());
+       }
+    }
+  
   scm_gc_mark (p->copyright_);
   scm_gc_mark (p->tagline_);
   //scm_gc_mark (p->lines_);