diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-12 04:50:52 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-12 04:50:52 +0000 |
commit | e1f15930cb6cb2f68ab17efdb7c081df813554a9 (patch) | |
tree | acf3731484333ee802f786291beda23d50fffed2 /perly.c | |
parent | 04dc9db9ad04317b0c2997dfa065b4061e90e683 (diff) | |
download | perl-e1f15930cb6cb2f68ab17efdb7c081df813554a9.tar.gz |
various cleanups
p4raw-id: //depot/perl@4350
Diffstat (limited to 'perly.c')
-rw-r--r-- | perly.c | 39 |
1 files changed, 22 insertions, 17 deletions
@@ -29,22 +29,7 @@ struct ysv { YYSTYPE oldyylval; }; -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); -} +static void yydestruct(pTHXo_ void *ptr); #line 49 "perly.y" #if 0 /* get this from perly.h instead */ @@ -1402,7 +1387,7 @@ yyparse() struct ysv *ysave; New(73, ysave, 1, struct ysv); - SAVEDESTRUCTOR(yydestruct, ysave); + SAVEDESTRUCTOR_X(yydestruct, ysave); ysave->oldyydebug = yydebug; ysave->oldyynerrs = yynerrs; ysave->oldyyerrflag = yyerrflag; @@ -2494,3 +2479,23 @@ yyabort: yyaccept: return retval; } + +#ifdef PERL_OBJECT +#define NO_XSLOCKS +#include "XSUB.h" +#endif + +static void +yydestruct(pTHXo_ 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); +} |