]> git.donarmstrong.com Git - lilypond.git/commitdiff
(output_def_body): take ownership of identifier
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 25 Aug 2006 14:09:19 +0000 (14:09 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 25 Aug 2006 14:09:19 +0000 (14:09 +0000)
back to C++.

ChangeLog
lily/parser.yy

index 6222a531201dd44328a6f3ac7941800c4db78f1f..d1a80a4f8c2dcef56685cd357196ccd4d3f38999 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2006-08-25  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * lily/parser.yy (output_def_body): take ownership of identifier
+       back to C++.
+
        * Documentation/user/advanced-notation.itely (Metronome marks):
        update use of \tempo in \midi.
 
index 52356a44d056839a683fb2e01398efd234e1a570..17b0cd25a72a7c3ede72fc293e677818b164291f 100644 (file)
@@ -731,6 +731,7 @@ paper_block:
                if ($$->lookup_variable (ly_symbol2scm ("is-paper")) != SCM_BOOL_T)
                {
                        PARSER->parser_error (@1, _ ("need \\paper for paper block"));
+                       $1->unprotect ();
                        $$ = get_paper (PARSER);
                }
        }
@@ -779,9 +780,11 @@ output_def_body:
        }
        | output_def_head_with_mode_switch '{' OUTPUT_DEF_IDENTIFIER    {
                $1->unprotect ();
+
                Output_def *o = unsmob_output_def ($3);
                o->input_origin_.set_spot (@$);
                $$ = o;
+               $$->protect ();
                PARSER->lexer_->remove_scope ();
                PARSER->lexer_->add_scope (o->scope_);
        }