summaryrefslogtreecommitdiff
path: root/perly.c.diff
diff options
context:
space:
mode:
Diffstat (limited to 'perly.c.diff')
-rw-r--r--perly.c.diff13
1 files changed, 8 insertions, 5 deletions
diff --git a/perly.c.diff b/perly.c.diff
index e13b04bd8c..69555cf2e0 100644
--- a/perly.c.diff
+++ b/perly.c.diff
@@ -105,7 +105,7 @@ Index: perly.c
if (yys = getenv("YYDEBUG"))
{
---- 1291,1348 ----
+--- 1291,1349 ----
#define YYACCEPT goto yyaccept
#define YYERROR goto yyerrlab
+
@@ -152,7 +152,8 @@ Index: perly.c
+ #endif
+ #endif
+
-+ struct ysv *ysave = (struct ysv*)safemalloc(sizeof(struct ysv));
++ struct ysv *ysave;
++ New(73, ysave, 1, struct ysv);
+ SAVEDESTRUCTOR(yydestruct, ysave);
+ ysave->oldyydebug = yydebug;
+ ysave->oldyynerrs = yynerrs;
@@ -166,14 +167,16 @@ Index: perly.c
{
***************
*** 1381,1384 ****
---- 1357,1368 ----
+--- 1357,1370 ----
yychar = (-1);
+ /*
+ ** Initialize private stacks (yyparse may be called from an action)
+ */
-+ ysave->yyss = yyss = (short*)safemalloc(yystacksize*sizeof(short));
-+ ysave->yyvs = yyvs = (YYSTYPE*)safemalloc(yystacksize*sizeof(YYSTYPE));
++ New(73, yyss, yystacksize, short);
++ New(73, yyvs, yystacksize, YYSTYPE);
++ ysave->yyss = yyss;
++ ysave->yyvs = yyvs;
+ if (!yyvs || !yyss)
+ goto yyoverflow;
+