perl 5.0 alpha 6
[p5sagit/p5-mst-13.2.git] / cv.h
1 /* $RCSfile: cv.h,v $$Revision: 4.1 $$Date: 92/08/07 18:26:42 $
2  *
3  *    Copyright (c) 1991, Larry Wall
4  *
5  *    You may distribute under the terms of either the GNU General Public
6  *    License or the Artistic License, as specified in the README file.
7  *
8  * $Log:        cv.h,v $
9  */
10
11 struct xpvcv {
12     char *      xpv_pv;         /* pointer to malloced string */
13     STRLEN      xpv_cur;        /* length of xp_pv as a C string */
14     STRLEN      xpv_len;        /* allocated size */
15     STRLEN      xof_off;        /* ptr is incremented by offset */
16     double      xnv_nv;         /* numeric value, if any */
17     MAGIC*      xmg_magic;      /* magic for scalar array */
18     HV*         xmg_stash;      /* class package */
19
20     HV *        xcv_stash;
21     OP *        xcv_start;
22     OP *        xcv_root;
23     I32       (*xcv_usersub)();
24     I32         xcv_userindex;
25     GV *        xcv_gv;
26     GV *        xcv_filegv;
27     long        xcv_depth;              /* >= 2 indicates recursive call */
28     AV *        xcv_padlist;
29     bool        xcv_deleted;
30 };
31 #define Nullcv Null(CV*)
32 #define CvSTASH(sv)     ((XPVCV*)SvANY(sv))->xcv_stash
33 #define CvSTART(sv)     ((XPVCV*)SvANY(sv))->xcv_start
34 #define CvROOT(sv)      ((XPVCV*)SvANY(sv))->xcv_root
35 #define CvUSERSUB(sv)   ((XPVCV*)SvANY(sv))->xcv_usersub
36 #define CvUSERINDEX(sv) ((XPVCV*)SvANY(sv))->xcv_userindex
37 #define CvGV(sv)        ((XPVCV*)SvANY(sv))->xcv_gv
38 #define CvFILEGV(sv)    ((XPVCV*)SvANY(sv))->xcv_filegv
39 #define CvDEPTH(sv)     ((XPVCV*)SvANY(sv))->xcv_depth
40 #define CvPADLIST(sv)   ((XPVCV*)SvANY(sv))->xcv_padlist
41 #define CvDELETED(sv)   ((XPVCV*)SvANY(sv))->xcv_deleted
42