Commit | Line | Data |
a0d0e21e |
1 | /* cv.h |
79072805 |
2 | * |
a0d0e21e |
3 | * Copyright (c) 1991-1994, Larry Wall |
79072805 |
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 | * |
79072805 |
8 | */ |
9 | |
10 | struct xpvcv { |
11 | char * xpv_pv; /* pointer to malloced string */ |
12 | STRLEN xpv_cur; /* length of xp_pv as a C string */ |
13 | STRLEN xpv_len; /* allocated size */ |
a0d0e21e |
14 | IV xof_off; /* integer value */ |
79072805 |
15 | double xnv_nv; /* numeric value, if any */ |
16 | MAGIC* xmg_magic; /* magic for scalar array */ |
17 | HV* xmg_stash; /* class package */ |
18 | |
19 | HV * xcv_stash; |
20 | OP * xcv_start; |
21 | OP * xcv_root; |
a0d0e21e |
22 | void (*xcv_xsub) _((CV*)); |
23 | ANY xcv_xsubany; |
8990e307 |
24 | GV * xcv_gv; |
79072805 |
25 | GV * xcv_filegv; |
26 | long xcv_depth; /* >= 2 indicates recursive call */ |
27 | AV * xcv_padlist; |
a0d0e21e |
28 | bool xcv_oldstyle; |
79072805 |
29 | }; |
30 | #define Nullcv Null(CV*) |
31 | #define CvSTASH(sv) ((XPVCV*)SvANY(sv))->xcv_stash |
32 | #define CvSTART(sv) ((XPVCV*)SvANY(sv))->xcv_start |
33 | #define CvROOT(sv) ((XPVCV*)SvANY(sv))->xcv_root |
a0d0e21e |
34 | #define CvXSUB(sv) ((XPVCV*)SvANY(sv))->xcv_xsub |
35 | #define CvXSUBANY(sv) ((XPVCV*)SvANY(sv))->xcv_xsubany |
8990e307 |
36 | #define CvGV(sv) ((XPVCV*)SvANY(sv))->xcv_gv |
79072805 |
37 | #define CvFILEGV(sv) ((XPVCV*)SvANY(sv))->xcv_filegv |
38 | #define CvDEPTH(sv) ((XPVCV*)SvANY(sv))->xcv_depth |
39 | #define CvPADLIST(sv) ((XPVCV*)SvANY(sv))->xcv_padlist |
a0d0e21e |
40 | #define CvOLDSTYLE(sv) ((XPVCV*)SvANY(sv))->xcv_oldstyle |
79072805 |
41 | |