diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-21 00:15:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-21 00:15:27 +0000 |
commit | a4c42bfb2337d37da89d789cb8cc226367994e32 (patch) | |
tree | c3eabdef5d565a4e515d2be0d9d4d0540bde0250 /Master/tlpkg/tlperl/lib/CORE/gv.h | |
parent | 8274475057f024d35332ac47c2e2f23ea156e6ed (diff) |
perl 5.14.2 from siep
git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/CORE/gv.h')
-rw-r--r-- | Master/tlpkg/tlperl/lib/CORE/gv.h | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/Master/tlpkg/tlperl/lib/CORE/gv.h b/Master/tlpkg/tlperl/lib/CORE/gv.h index 4986b43cc60..ab5c7889872 100644 --- a/Master/tlpkg/tlperl/lib/CORE/gv.h +++ b/Master/tlpkg/tlperl/lib/CORE/gv.h @@ -27,10 +27,15 @@ struct gp { #if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__INTEL_COMPILER) # define GvGP(gv) \ - (*({GV *const _gvgp = (GV *) (gv); \ + (0+(*({GV *const _gvgp = (GV *) (gv); \ assert(SvTYPE(_gvgp) == SVt_PVGV || SvTYPE(_gvgp) == SVt_PVLV); \ assert(isGV_with_GP(_gvgp)); \ - &((_gvgp)->sv_u.svu_gp);})) + &((_gvgp)->sv_u.svu_gp);}))) +# define GvGP_set(gv,gp) \ + {GV *const _gvgp = (GV *) (gv); \ + assert(SvTYPE(_gvgp) == SVt_PVGV || SvTYPE(_gvgp) == SVt_PVLV); \ + assert(isGV_with_GP(_gvgp)); \ + (_gvgp)->sv_u.svu_gp = (gp); } # define GvFLAGS(gv) \ (*({GV *const _gvflags = (GV *) (gv); \ assert(SvTYPE(_gvflags) == SVt_PVGV || SvTYPE(_gvflags) == SVt_PVLV); \ @@ -52,7 +57,8 @@ struct gp { # define GvNAME_get(gv) ({ assert(GvNAME_HEK(gv)); (char *)HEK_KEY(GvNAME_HEK(gv)); }) # define GvNAMELEN_get(gv) ({ assert(GvNAME_HEK(gv)); HEK_LEN(GvNAME_HEK(gv)); }) #else -# define GvGP(gv) ((gv)->sv_u.svu_gp) +# define GvGP(gv) (0+(gv)->sv_u.svu_gp) +# define GvGP_set(gv,gp) ((gv)->sv_u.svu_gp = (gp)) # define GvFLAGS(gv) (GvXPVGV(gv)->xpv_cur) # define GvSTASH(gv) (GvXPVGV(gv)->xnv_u.xgv_stash) # define GvNAME_HEK(gv) (GvXPVGV(gv)->xiv_u.xivu_namehek) @@ -88,7 +94,17 @@ Return the SV from the GV. #endif #define GvREFCNT(gv) (GvGP(gv)->gp_refcnt) -#define GvIO(gv) ((gv) && SvTYPE((const SV*)gv) == SVt_PVGV && GvGP(gv) ? GvIOp(gv) : NULL) +#define GvIO(gv) \ + ( \ + (gv) \ + && ( \ + SvTYPE((const SV*)(gv)) == SVt_PVGV \ + || SvTYPE((const SV*)(gv)) == SVt_PVLV \ + ) \ + && GvGP(gv) \ + ? GvIOp(gv) \ + : NULL \ + ) #define GvIOp(gv) (GvGP(gv)->gp_io) #define GvIOn(gv) (GvIO(gv) ? GvIOp(gv) : GvIOp(gv_IOadd(gv))) @@ -104,7 +120,8 @@ Return the SV from the GV. GvGP(gv)->gp_hv : \ GvGP(gv_HVadd(gv))->gp_hv) -#define GvCV(gv) (GvGP(gv)->gp_cv) +#define GvCV(gv) (0+GvGP(gv)->gp_cv) +#define GvCV_set(gv,cv) (GvGP(gv)->gp_cv = (cv)) #define GvCVGEN(gv) (GvGP(gv)->gp_cvgen) #define GvCVu(gv) (GvGP(gv)->gp_cvgen ? NULL : GvGP(gv)->gp_cv) @@ -114,6 +131,7 @@ Return the SV from the GV. #define GvFILEGV(gv) (gv_fetchfile(GvFILE(gv))) #define GvEGV(gv) (GvGP(gv)->gp_egv) +#define GvEGVx(gv) (isGV_with_GP(gv) ? GvEGV(gv) : NULL) #define GvENAME(gv) GvNAME(GvEGV(gv) ? GvEGV(gv) : gv) #define GvESTASH(gv) GvSTASH(GvEGV(gv) ? GvEGV(gv) : gv) @@ -127,6 +145,9 @@ Return the SV from the GV. #define GVf_IMPORTED_HV 0x40 #define GVf_IMPORTED_CV 0x80 +/* Temporary flag for the tie $handle deprecation warnings. */ +#define GVf_TIEWARNED 0x100 + #define GvINTRO(gv) (GvFLAGS(gv) & GVf_INTRO) #define GvINTRO_on(gv) (GvFLAGS(gv) |= GVf_INTRO) #define GvINTRO_off(gv) (GvFLAGS(gv) &= ~GVf_INTRO) @@ -167,14 +188,14 @@ Return the SV from the GV. # define Nullgv Null(GV*) #endif -#define DM_UID 0x003 -#define DM_RUID 0x001 -#define DM_EUID 0x002 -#define DM_ARRAY 0x004 -#define DM_GID 0x030 -#define DM_RGID 0x010 -#define DM_EGID 0x020 -#define DM_DELAY 0x100 +#define DM_RUID 0x001 +#define DM_EUID 0x002 +#define DM_UID (DM_RUID|DM_EUID) +#define DM_ARRAY_ISA 0x004 +#define DM_RGID 0x010 +#define DM_EGID 0x020 +#define DM_GID (DM_RGID|DM_EGID) +#define DM_DELAY 0x100 /* * symbol creation flags, for use in gv_fetchpv() and get_*v() |