summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-10 20:42:40 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-10 20:42:40 +0000
commit11b9c9ab23dee98050c094a6a3713808e3e180cf (patch)
tree26af37f6b40806cfedd24504ae354c5b90d4c471 /perly.y
parentdda061f299f6b87abed2423b4de87ce8ef198c71 (diff)
downloadperl-11b9c9ab23dee98050c094a6a3713808e3e180cf.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.y17
1 files changed, 16 insertions, 1 deletions
diff --git a/perly.y b/perly.y
index c8163e135e..93e5f77af9 100644
--- a/perly.y
+++ b/perly.y
@@ -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);
+}
%}