From: Nicholas Clark Date: Mon, 25 Jan 2010 13:55:28 +0000 (+0000) Subject: Remove union _xivu from struct xpvav - replace it with a non-union xav_alloc. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4f7003f5e8adb225a16f3788ec81e193021f41e5;p=p5sagit%2Fp5-mst-13.2.git Remove union _xivu from struct xpvav - replace it with a non-union xav_alloc. This was the only user of xivu_p1 in union _xivu, so remove that too. --- diff --git a/av.h b/av.h index f9af3ce..5231c4d 100644 --- a/av.h +++ b/av.h @@ -13,11 +13,9 @@ struct xpvav { union _xmgu xmg_u; SSize_t xav_fill; /* Index of last element present */ SSize_t xav_max; /* max index for which array has space */ - union _xivu xiv_u; + SV** xav_alloc; /* pointer to beginning of C array of SVs */ }; -/* SV** xav_alloc; */ -#define xav_alloc xiv_u.xivu_p1 /* SV* xav_arylen; */ /* SVpav_REAL is set for all AVs whose xav_array contents are refcounted. @@ -59,7 +57,7 @@ Same as C. Deprecated, use C instead. #endif #define AvARRAY(av) ((av)->sv_u.svu_array) -#define AvALLOC(av) (*((SV***)&((XPVAV*) SvANY(av))->xav_alloc)) +#define AvALLOC(av) ((XPVAV*) SvANY(av))->xav_alloc #define AvMAX(av) ((XPVAV*) SvANY(av))->xav_max #define AvFILLp(av) ((XPVAV*) SvANY(av))->xav_fill #define AvARYLEN(av) (*Perl_av_arylen_p(aTHX_ MUTABLE_AV(av))) diff --git a/sv.c b/sv.c index 3b332f2..fe3f362 100644 --- a/sv.c +++ b/sv.c @@ -976,7 +976,7 @@ static const struct body_details bodies_by_type[] = { HASARENA, FIT_ARENA(0, sizeof(XPVLV)) }, { sizeof(XPVAV), - copy_length(XPVAV, xiv_u), + copy_length(XPVAV, xav_alloc), 0, SVt_PVAV, TRUE, NONV, HASARENA, FIT_ARENA(0, sizeof(XPVAV)) }, diff --git a/sv.h b/sv.h index f88f139..7793e29 100644 --- a/sv.h +++ b/sv.h @@ -418,7 +418,6 @@ union _xivu { IV xivu_iv; /* integer value */ /* xpvfm: lines */ UV xivu_uv; - void * xivu_p1; I32 xivu_i32; HEK * xivu_namehek; /* xpvlv, xpvgv: GvNAME */ HV * xivu_hv; /* regexp: paren_names */