Subject: | hent_val accesses |
Date: | Wed, 18 Mar 2015 13:45:56 +1100 |
To: | bug-List-MoreUtils [...] rt.cpan.org |
From: | Brad Forschinger <bnjf [...] bnjf.id.au> |
Hi,
Solaris 10 has 5.8.4 in userland, which is prior to the
union-ification of hent_val:
http://perl5.git.perl.org/perl.git/blobdiff/21c1191d96d28acb87f4479c4eef93ca5aef5405..de61663159118b735969bec9539d9251323990fa:/hv.h
So MoreUtils.xs line 1392, 1409, 1429 should probably use the macros.
diff below.
Brad
--- MoreUtils.xs.orig 2015-03-18 13:43:42.636292000 +1100
+++ MoreUtils.xs 2015-03-18 13:44:45.875570000 +1100
@@ -1389,7 +1389,7 @@
hv_store_ent(hv, tmp, newSViv(1), 0);
}
else {
- SV *v = he->he_valu.hent_val;
+ SV *v = HeVAL(he);
IV how_many = SvIVX(v);
sv_setiv(v, ++how_many);
}
@@ -1406,7 +1406,7 @@
sv_setsv_mg(tmp, args[i]);
HE *he = hv_fetch_ent(hv, tmp, 0, 0);
if (he) {
- SV *v = he->he_valu.hent_val;
+ SV *v = HeVAL(he);
IV how_many = SvIVX(v);
if( 1 == how_many )
++cnt;
@@ -1426,7 +1426,7 @@
sv_setsv_mg(tmp, args[i]);
HE *he = hv_fetch_ent(hv, tmp, 0, 0);
if (he) {
- SV *v = he->he_valu.hent_val;
+ SV *v = HeVAL(he);
IV how_many = SvIVX(v);
if( 1 == how_many )
args[cnt++] = args[i];