diff options
Diffstat (limited to 'perly_c.diff')
-rw-r--r-- | perly_c.diff | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/perly_c.diff b/perly_c.diff index f42a10c9ef..450b159fb2 100644 --- a/perly_c.diff +++ b/perly_c.diff @@ -28,7 +28,7 @@ + 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; @@ -134,7 +134,7 @@ yyaccept: ! return (0); } ---- 2524,2550 ---- +--- 2524,2570 ---- #endif if (yyssp >= yyss + yystacksize - 1) { @@ -161,4 +161,24 @@ ! retval = 1; 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); } |