diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-10 20:42:40 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-10 20:42:40 +0000 |
commit | c76ac1ee16c5c9591d8ffad5a0651b7f81738b68 (patch) | |
tree | 26af37f6b40806cfedd24504ae354c5b90d4c471 /perly.y | |
parent | a99ba4038e8029c0d033ef497d3a0f8653f0d570 (diff) | |
download | perl-c76ac1ee16c5c9591d8ffad5a0651b7f81738b68.tar.gz |
revert SAVEDESTRUCTOR() to accepting void(*)(void*) for source
compatibility; introduce SAVEDESTRUCTOR_X() that accepts
void(*)(pTHX_ void*)
p4raw-id: //depot/perl@4339
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -39,7 +39,22 @@ struct ysv { YYSTYPE oldyylval; }; -static void yydestruct(pTHXo_ void *ptr); +static void yydestruct(void *ptr); + +static void +yydestruct(void *ptr) +{ + struct ysv* ysave = (struct ysv*)ptr; + if (ysave->yyss) Safefree(ysave->yyss); + if (ysave->yyvs) Safefree(ysave->yyvs); + yydebug = ysave->oldyydebug; + yynerrs = ysave->oldyynerrs; + yyerrflag = ysave->oldyyerrflag; + yychar = ysave->oldyychar; + yyval = ysave->oldyyval; + yylval = ysave->oldyylval; + Safefree(ysave); +} %} |