recognize more constructs such as C<$-> in pod (from Russ Allbery
[p5sagit/p5-mst-13.2.git] / cv.h
diff --git a/cv.h b/cv.h
index 0eeedfd..7042708 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.
@@ -14,14 +14,14 @@ struct xpvcv {
     STRLEN     xpv_cur;        /* length of xp_pv as a C string */
     STRLEN     xpv_len;        /* allocated size */
     IV         xof_off;        /* integer value */
-    double     xnv_nv;         /* numeric value, if any */
+    NV         xnv_nv;         /* numeric value, if any */
     MAGIC*     xmg_magic;      /* magic for scalar array */
     HV*                xmg_stash;      /* class package */
 
     HV *       xcv_stash;
     OP *       xcv_start;
     OP *       xcv_root;
-    void      (*xcv_xsub) _((CV*));
+    void       (*xcv_xsub) (pTHXo_ CV*);
     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))