diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2007-04-01 01:27:57 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2007-04-01 01:27:57 +0000 |
commit | e3abe207f764929a97eafa503a3780d5b7636ed2 (patch) | |
tree | 84f144eb96d5794911b2fc5ef5487e419f76caf9 /perly.c | |
parent | 90e3715fae5c61e6e1833dc9ad520176419400f4 (diff) | |
download | perl-e3abe207f764929a97eafa503a3780d5b7636ed2.tar.gz |
Make parser_free() be called slightly later,
i.e. at the point where lexer vars are being restored in a LEAVE,
rather than at the end of yyparse()
p4raw-id: //depot/perl@30822
Diffstat (limited to 'perly.c')
-rw-r--r-- | perly.c | 20 |
1 files changed, 3 insertions, 17 deletions
@@ -306,20 +306,6 @@ S_clear_yystack(pTHX_ const yy_parser *parser) } } -/* delete a parser object */ - -#ifndef PERL_IN_MADLY_C -void -Perl_parser_free(pTHX_ const yy_parser *parser) -{ - S_clear_yystack(aTHX_ parser); - Safefree(parser->stack); - Safefree(parser->lex_brackstack); - Safefree(parser->lex_casestack); - PL_parser = parser->old_parser; - Safefree(parser); -} -#endif /*----------. | yyparse. | @@ -362,8 +348,8 @@ Perl_yyparse (pTHX) parser = PL_parser; ps = parser->ps; - ENTER; /* force parser free before we return */ - SAVEPARSER(parser); + ENTER; /* force parser stack cleanup before we return */ + SAVEDESTRUCTOR_X(S_clear_yystack, parser); /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | @@ -691,7 +677,7 @@ Perl_yyparse (pTHX) goto yyreturn; yyreturn: - LEAVE; /* force parser free before we return */ + LEAVE; /* force parser stack cleanup before we return */ return yyresult; } |