summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-02-07 12:39:09 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-02-07 12:39:09 +0000
commit34184a49c8a0771dbea73b3f0519126fd5b22c2f (patch)
treefc9ddf778cd97ca98ec3f50dbf68c77a8b5ffff8 /regcomp.h
parentfa46748d2969714b8b401ff6111871d34b2dd828 (diff)
downloadperl-34184a49c8a0771dbea73b3f0519126fd5b22c2f.tar.gz
Ilya's idea for cleaning up failed regex allocs (substantive parts
disabled, fails tests) p4raw-id: //depot/perl@2822
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/regcomp.h b/regcomp.h
index fef317a2ac..1a139c5b77 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -186,8 +186,19 @@ struct regnode_2 {
#define UCHARAT(p) PL_regdummy
#endif /* lint */
-#define FAIL(m) croak ("/%.127s/: %s", PL_regprecomp,m)
-#define FAIL2(pat,m) re_croak2("/%.127s/: ",pat,PL_regprecomp,m)
+#define FAIL(m) \
+ STMT_START { \
+ /*if (!SIZE_ONLY) \
+ ReREFCNT_dec(PL_regcomp_rx);*/ \
+ croak ("/%.127s/: %s", PL_regprecomp,m); \
+ } STMT_END
+
+#define FAIL2(pat,m) \
+ STMT_START { \
+ /*if (!SIZE_ONLY) \
+ ReREFCNT_dec(PL_regcomp_rx);*/ \
+ re_croak2("/%.127s/: ",pat,PL_regprecomp,m); \
+ } STMT_END
#define EXTRA_SIZE(guy) ((sizeof(guy)-1)/sizeof(struct regnode))