slurping an empty file should return '' rather than undef, with
[p5sagit/p5-mst-13.2.git] / regcomp.h
index 1a139c5..1538f8a 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -188,15 +188,15 @@ struct regnode_2 {
 
 #define        FAIL(m) \
     STMT_START {                                       \
-       /*if (!SIZE_ONLY)                               \
-           ReREFCNT_dec(PL_regcomp_rx);*/              \
+       if (!SIZE_ONLY)                                 \
+           SAVEDESTRUCTOR(clear_re,(void*)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);*/              \
+       if (!SIZE_ONLY)                                 \
+           SAVEDESTRUCTOR(clear_re,(void*)PL_regcomp_rx);              \
        re_croak2("/%.127s/: ",pat,PL_regprecomp,m);    \
     } STMT_END