From dc66d70d0e087e71361f71fbf68f85f473a41ae5 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 19 Jun 2002 07:19:24 +0000 Subject: [PATCH] protect --- ChangeLog | 5 +++++ lily/parser.yy | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0fc179168c..9514a4ab97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-06-19 Han-Wen + + * lily/parser.yy: various protection fixes. Less objects are now + overprotected. + 2002-06-18 Jan Nieuwenhuizen * stepmake/bin/release.py (prev_ver): Bugfix: assume new diff diff --git a/lily/parser.yy b/lily/parser.yy index 5a27a77dfe..cc806fe177 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -940,6 +940,7 @@ Composite_music: Music * chm = new Untransposable_music () ; chm->set_mus_property ("element", $3->self_scm ()); $$ = chm; + scm_gc_unprotect_object ($3->self_scm()); THIS->lexer_p_->pop_state (); } @@ -949,6 +950,7 @@ Composite_music: { Music * chm = new Un_relativable_music ; chm->set_mus_property ("element", $3->self_scm ()); + scm_gc_unprotect_object ($3->self_scm()); $$ = chm; THIS->lexer_p_->pop_state (); @@ -1126,6 +1128,8 @@ command_element: command_req { $$ = new Request_chord (SCM_EOL); $$->set_mus_property ("elements", gh_cons ($1->self_scm (), SCM_EOL)); + scm_gc_unprotect_object ($1->self_scm()); + $$-> set_spot (THIS->here_input ()); $1-> set_spot (THIS->here_input ()); } @@ -1137,6 +1141,7 @@ command_element: $$ = new Request_chord (SCM_EOL); $$->set_mus_property ("elements", gh_cons (l->self_scm (), SCM_EOL)); + scm_gc_unprotect_object (l->self_scm()); $$->set_spot (THIS->here_input ()); } | E_RIGHTSQUARE { @@ -1148,6 +1153,8 @@ command_element: $$ = new Request_chord (SCM_EOL); $$->set_mus_property ("elements", gh_cons (l->self_scm (), SCM_EOL)); $$->set_spot (THIS->here_input ()); + scm_gc_unprotect_object (l->self_scm()); + } | E_BACKSLASH { $$ = new Music (gh_list (gh_cons (ly_symbol2scm ("name"), ly_symbol2scm ("separator")), SCM_UNDEFINED)); @@ -1845,6 +1852,7 @@ simple_element: Simultaneous_music*v = new Request_chord (SCM_EOL); v->set_mus_property ("elements", scm_list_n (n->self_scm (), SCM_UNDEFINED)); + scm_gc_unprotect_object (n->self_scm()); v->set_spot (i); n->set_spot (i); -- 2.39.5