]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/output-def.cc
*** empty log message ***
[lilypond.git] / lily / output-def.cc
index 73d646b2d3a78ec313cd135db386d3c5509c7629..99015153f9cf90bc54b8b0adfec79fd6f261ad05 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "output-def.hh"
 Output_def::Output_def ()
 {
   scope_ = SCM_EOL;
+  parser_ = 0;
   parent_ = 0;
-  smobify_self ();
 
+  smobify_self ();
+  
   scope_ = ly_make_anonymous_module (false);
 }
 
@@ -36,6 +38,7 @@ Output_def::Output_def (Output_def const &s)
 {
   scope_ = SCM_EOL;
   parent_ = 0;
+  parser_ = s.parser_;
   smobify_self ();
 
   input_origin_ = s.input_origin_;
@@ -51,6 +54,12 @@ Output_def::~Output_def ()
 IMPLEMENT_SMOBS (Output_def);
 IMPLEMENT_DEFAULT_EQUAL_P (Output_def);
 
+Lily_parser *
+Output_def::get_parser () const
+{
+  return parent_ ? parent_->get_parser () : parser_;
+}
+
 SCM
 Output_def::mark_smob (SCM m)
 {
@@ -118,9 +127,9 @@ Output_def::lookup_variable (SCM sym) const
 }
 
 SCM
-Output_def::c_variable (String s) const
+Output_def::c_variable (std::string s) const
 {
-  return lookup_variable (ly_symbol2scm (s.to_str0 ()));
+  return lookup_variable (ly_symbol2scm (s.c_str ()));
 }
 
 void