regcomp.c: Add macro for generating deprecated warnings
authorKarl Williamson <public@khwilliamson.com>
Tue, 22 Jan 2013 20:35:15 +0000 (13:35 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 24 Jan 2013 02:35:34 +0000 (19:35 -0700)
This will be used in a future commit

regcomp.c

index daf310f..a8322ea 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -548,6 +548,12 @@ static const scan_data_t zero_scan_data =
            (int)offset, RExC_precomp, RExC_precomp + offset);          \
 } STMT_END
 
+#define        vWARN_dep(loc, m) STMT_START {                                  \
+    const IV offset = loc - RExC_precomp;                              \
+    Perl_warner(aTHX_ packWARN(WARN_DEPRECATED), m REPORT_LOCATION,    \
+           (int)offset, RExC_precomp, RExC_precomp + offset);          \
+} STMT_END
+
 #define        ckWARNdep(loc,m) STMT_START {                                   \
     const IV offset = loc - RExC_precomp;                              \
     Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED),                  \