PATCH (5.005_57): defined(@a) now deprecated
[p5sagit/p5-mst-13.2.git] / cv.h
diff --git a/cv.h b/cv.h
index f78b5a4..cf5a750 100644 (file)
--- a/cv.h
+++ b/cv.h
@@ -1,6 +1,6 @@
 /*    cv.h
  *
- *    Copyright (c) 1991-1997, Larry Wall
+ *    Copyright (c) 1991-1999, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -21,7 +21,7 @@ struct xpvcv {
     HV *       xcv_stash;
     OP *       xcv_start;
     OP *       xcv_root;
-    void      (*xcv_xsub) _((CPERLproto_ CV*));
+    void      (*xcv_xsub) _((CV* _CPERLproto));
     ANY                xcv_xsubany;
     GV *       xcv_gv;
     GV *       xcv_filegv;
@@ -75,9 +75,11 @@ struct xpvcv {
 #define CvANON_on(cv)          (CvFLAGS(cv) |= CVf_ANON)
 #define CvANON_off(cv)         (CvFLAGS(cv) &= ~CVf_ANON)
 
+#ifdef PERL_XSUB_OLDSTYLE
 #define CvOLDSTYLE(cv)         (CvFLAGS(cv) & CVf_OLDSTYLE)
 #define CvOLDSTYLE_on(cv)      (CvFLAGS(cv) |= CVf_OLDSTYLE)
 #define CvOLDSTYLE_off(cv)     (CvFLAGS(cv) &= ~CVf_OLDSTYLE)
+#endif
 
 #define CvUNIQUE(cv)           (CvFLAGS(cv) & CVf_UNIQUE)
 #define CvUNIQUE_on(cv)                (CvFLAGS(cv) |= CVf_UNIQUE)
@@ -94,3 +96,12 @@ struct xpvcv {
 #define CvLOCKED(cv)           (CvFLAGS(cv) & CVf_LOCKED)
 #define CvLOCKED_on(cv)                (CvFLAGS(cv) |= CVf_LOCKED)
 #define CvLOCKED_off(cv)       (CvFLAGS(cv) &= ~CVf_LOCKED)
+
+#define CvEVAL(cv)             (CvUNIQUE(cv) && !SvFAKE(cv))
+#define CvEVAL_on(cv)          (CvUNIQUE_on(cv),SvFAKE_off(cv))
+#define CvEVAL_off(cv)         CvUNIQUE_off(cv)
+
+/* BEGIN|INIT|END */
+#define CvSPECIAL(cv)          (CvUNIQUE(cv) && SvFAKE(cv))
+#define CvSPECIAL_on(cv)       (CvUNIQUE_on(cv),SvFAKE_on(cv))
+#define CvSPECIAL_off(cv)      (CvUNIQUE_off(cv),SvFAKE_off(cv))