summaryrefslogtreecommitdiff
path: root/perly.fixer
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-01-09 12:55:09 -0500
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-06 15:53:53 +0000
commit8c52afecd5252bed5ed8df3a63a6cd9affde4ab4 (patch)
treebf76561b68d175b89a738902a9cce82ceb3cb23c /perly.fixer
parentcdaebead333273a920fe10cbcb2213a9fbefa241 (diff)
downloadperl-8c52afecd5252bed5ed8df3a63a6cd9affde4ab4.tar.gz
Newer -DLEAKTEST patch
p4raw-id: //depot/perl@466
Diffstat (limited to 'perly.fixer')
-rwxr-xr-xperly.fixer20
1 files changed, 8 insertions, 12 deletions
diff --git a/perly.fixer b/perly.fixer
index 156881657f..951da0078f 100755
--- a/perly.fixer
+++ b/perly.fixer
@@ -105,8 +105,8 @@ short *maxyyps;
/yypv *= *&yyv\[ *-1 *\];/c\
\ if (!yyv) {\
-\ yyv = (YYSTYPE*) safemalloc(yymaxdepth * sizeof(YYSTYPE));\
-\ yys = (short*) safemalloc(yymaxdepth * sizeof(short));\
+\ New(73, yyv, yymaxdepth, YYSTYPE);\
+\ New(73, yys, yymaxdepth, short);\
\ if ( !yyv || !yys ) {\
\ yyerror( "out of memory" );\
\ return(1);\
@@ -123,10 +123,8 @@ short *maxyyps;
\ int ts = yyps - yys;\
\
\ yymaxdepth *= 2;\
-\ yyv = (YYSTYPE*)realloc((char*)yyv,\
-\ yymaxdepth*sizeof(YYSTYPE));\
-\ yys = (short*)realloc((char*)yys,\
-\ yymaxdepth*sizeof(short));\
+\ Renew(yyv, yymaxdepth, YYSTYPE);\
+\ Renew(yys, yymaxdepth, short);\
\ if ( !yyv || !yys ) {\
\ yyerror( "yacc stack overflow" );\
\ return(1);\
@@ -170,8 +168,8 @@ int *maxyyps;
/yypv *= *&yyv\[ *-1 *\];/c\
\ if (!yyv) {\
-\ yyv = (YYSTYPE*) safemalloc(yymaxdepth * sizeof(YYSTYPE));\
-\ yys = (int*) safemalloc(yymaxdepth * sizeof(int));\
+\ New(73, yyv, yymaxdepth, YYSTYPE);\
+\ New(73, yys, yymaxdepth, int);\
\ maxyyps = &yys[yymaxdepth];\
\ }\
\ yyps = &yys[-1];\
@@ -183,10 +181,8 @@ int *maxyyps;
\ int ts = yy_ps - yys;\
\
\ yymaxdepth *= 2;\
-\ yyv = (YYSTYPE*)realloc((char*)yyv,\
-\ yymaxdepth*sizeof(YYSTYPE));\
-\ yys = (int*)realloc((char*)yys,\
-\ yymaxdepth*sizeof(int));\
+\ Renew(yyv, yymaxdepth, YYSTYPE);\
+\ Renew(yys, yymaxdepth, int);\
\ yy_ps = yyps = yys + ts;\
\ yy_pv = yypv = yyv + tv;\
\ maxyyps = &yys[yymaxdepth];\