Skip to content

Commit

Permalink
Fix Scalar-List-Utils build on C89 compilers; patch sent upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
arc committed May 16, 2016
1 parent 7ede3c4 commit 9d293dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions cpan/Scalar-List-Utils/ListUtil.xs
Expand Up @@ -1037,6 +1037,9 @@ CODE:

for(index = 0 ; index < items ; index++) {
SV *arg = args[index];
#ifdef HV_FETCH_EMPTY_HE
HE* he;
#endif

if(SvGAMAGIC(arg))
/* clone the value so we don't invoke magic again */
Expand All @@ -1049,7 +1052,7 @@ CODE:
else
sv_setpvf(keysv, "%"NVgf, SvNV(arg));
#ifdef HV_FETCH_EMPTY_HE
HE* he = (HE*) hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0);
he = (HE*) hv_common(seen, NULL, SvPVX(keysv), SvCUR(keysv), 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0);
if (HeVAL(he))
continue;

Expand All @@ -1072,6 +1075,9 @@ CODE:

for(index = 0 ; index < items ; index++) {
SV *arg = args[index];
#ifdef HV_FETCH_EMPTY_HE
HE *he;
#endif

if(SvGAMAGIC(arg))
/* clone the value so we don't invoke magic again */
Expand All @@ -1090,7 +1096,7 @@ CODE:
continue;
}
#ifdef HV_FETCH_EMPTY_HE
HE* he = (HE*) hv_common(seen, arg, NULL, 0, 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0);
he = (HE*) hv_common(seen, arg, NULL, 0, 0, HV_FETCH_LVALUE | HV_FETCH_EMPTY_HE, NULL, 0);
if (HeVAL(he))
continue;

Expand Down
2 changes: 1 addition & 1 deletion t/porting/customized.dat
Expand Up @@ -44,7 +44,7 @@ Scalar-List-Utils cpan/Scalar-List-Utils/lib/List/Util.pm e479a29c6b66ac5cbbde4e
Scalar-List-Utils cpan/Scalar-List-Utils/lib/List/Util/XS.pm cbc38838d32fd213ae7b37ac38e30195355be3b9
Scalar-List-Utils cpan/Scalar-List-Utils/lib/Scalar/Util.pm 14a20075dfb9a4ef33b99115ed6f43e6d1a15f9b
Scalar-List-Utils cpan/Scalar-List-Utils/lib/Sub/Util.pm b984c0a2935bd5f5cf1733df846c8a8c0661ef32
Scalar-List-Utils cpan/Scalar-List-Utils/ListUtil.xs 7c859728ec2fa645fc91933532ce67fc491623d2
Scalar-List-Utils cpan/Scalar-List-Utils/ListUtil.xs 362a247c65878265fd8acae607b207400628ef3b
Socket cpan/Socket/Socket.pm 98e38176d745c38282907f391c077298f5a3d0ba
Socket cpan/Socket/Socket.xs edd4fed212785f11c5c2095a75941dad27d586d9
autodie cpan/autodie/t/mkdir.t 9e70d2282a3cc7d76a78bf8144fccba20fb37dac
Expand Down

0 comments on commit 9d293dd

Please sign in to comment.