diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-20 11:54:38 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-20 11:54:38 +0000 |
commit | bf53b3a5f249ae2a059ca8014f7a62d301c554bc (patch) | |
tree | 0183c85069e9165086940f61f7ddb80b5b1e4137 /cv.h | |
parent | aa092aa30938df861825e5192a09d0567bdac529 (diff) | |
download | perl-bf53b3a5f249ae2a059ca8014f7a62d301c554bc.tar.gz |
xcv_start and xcv_xsubany can be merged into a union, as they are never
both needed.
p4raw-id: //depot/perl@27243
Diffstat (limited to 'cv.h')
-rw-r--r-- | cv.h | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,7 +1,7 @@ /* cv.h * * Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, - * 2000, 2001, 2002, 2003, 2004, 2005, by Larry Wall and others + * 2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -23,10 +23,12 @@ struct xpvcv { HV* xmg_stash; /* class package */ HV * xcv_stash; - OP * xcv_start; + union { + OP * xcv_start; + ANY xcv_xsubany; + } xcv_start_u; OP * xcv_root; void (*xcv_xsub) (pTHX_ CV*); - ANY xcv_xsubany; GV * xcv_gv; char * xcv_file; long xcv_depth; /* >= 2 indicates recursive call */ @@ -55,10 +57,10 @@ Returns the stash of the CV. #define Nullcv Null(CV*) #define CvSTASH(sv) ((XPVCV*)SvANY(sv))->xcv_stash -#define CvSTART(sv) ((XPVCV*)SvANY(sv))->xcv_start +#define CvSTART(sv) ((XPVCV*)SvANY(sv))->xcv_start_u.xcv_start #define CvROOT(sv) ((XPVCV*)SvANY(sv))->xcv_root #define CvXSUB(sv) ((XPVCV*)SvANY(sv))->xcv_xsub -#define CvXSUBANY(sv) ((XPVCV*)SvANY(sv))->xcv_xsubany +#define CvXSUBANY(sv) ((XPVCV*)SvANY(sv))->xcv_start_u.xcv_xsubany #define CvGV(sv) ((XPVCV*)SvANY(sv))->xcv_gv #define CvFILE(sv) ((XPVCV*)SvANY(sv))->xcv_file #ifdef USE_ITHREADS |