SvPVX_const() - patch #4
[p5sagit/p5-mst-13.2.git] / warnings.h
index 3da705e..09aedb0 100644 (file)
@@ -1,4 +1,5 @@
-/* !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
+/* -*- buffer-read-only: t -*-
+   !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
    This file is built by warnings.pl
    Any changes made here will be lost!
 */
@@ -22,6 +23,9 @@
 
 #define specialWARN(x)         ((x) == pWARN_STD || (x) == pWARN_ALL ||        \
                                 (x) == pWARN_NONE)
+
+/* Warnings Categories added in Perl 5.008 */
+
 #define WARN_ALL               0
 #define WARN_CLOSURE           1
 #define WARN_DEPRECATED                2
 #define WARN_RESERVED          37
 #define WARN_SEMICOLON         38
 #define WARN_TAINT             39
-#define WARN_UNINITIALIZED     40
-#define WARN_UNPACK            41
-#define WARN_UNTIE             42
-#define WARN_UTF8              43
-#define WARN_VOID              44
-#define WARN_Y2K               45
+#define WARN_THREADS           40
+#define WARN_UNINITIALIZED     41
+#define WARN_UNPACK            42
+#define WARN_UNTIE             43
+#define WARN_UTF8              44
+#define WARN_VOID              45
+
+/* Warnings Categories added in Perl 5.009 */
+
+#define WARN_ASSERTIONS                46
 
 #define WARNsize               12
 #define WARN_ALLstring         "\125\125\125\125\125\125\125\125\125\125\125\125"
@@ -77,8 +85,8 @@
 #define isLEXWARN_on   (PL_curcop->cop_warnings != pWARN_STD)
 #define isLEXWARN_off  (PL_curcop->cop_warnings == pWARN_STD)
 #define isWARN_ONCE    (PL_dowarn & (G_WARN_ON|G_WARN_ONCE))
-#define isWARN_on(c,x) (IsSet(SvPVX(c), 2*(x)))
-#define isWARNf_on(c,x)        (IsSet(SvPVX(c), 2*(x)+1))
+#define isWARN_on(c,x) (IsSet(SvPVX_const(c), 2*(x)))
+#define isWARNf_on(c,x)        (IsSet(SvPVX_const(c), 2*(x)+1))
 
 #define ckWARN(x)                                                      \
        ( (isLEXWARN_on && PL_curcop->cop_warnings != pWARN_NONE &&     \
              isWARNf_on(PL_curcop->cop_warnings, unpackWARN4(x))))
 
 /* end of file warnings.h */
-
+/* ex: set ro: */