From: Vincent Pit Date: Thu, 22 Oct 2009 18:54:50 +0000 (+0200) Subject: Compatibility fix for 5.11.1 X-Git-Tag: v0.39~18 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FVariable-Magic.git;a=commitdiff_plain;h=6db3edecb6ba3be691816c4c16f623227159a832 Compatibility fix for 5.11.1 --- diff --git a/Magic.xs b/Magic.xs index db8e230..628bf56 100644 --- a/Magic.xs +++ b/Magic.xs @@ -152,6 +152,8 @@ STATIC SV *vmg_clone(pTHX_ SV *sv, tTHX owner) { * reverted to dev-5.11 as 9cdcb38b */ #if VMG_HAS_PERL_MAINT(5, 8, 9, 28160) || VMG_HAS_PERL_MAINT(5, 9, 3, 25854) || VMG_HAS_PERL(5, 10, 0) # ifndef VMG_COMPAT_ARRAY_PUSH_NOLEN +/* This branch should only apply for perls before the official 5.11.0 release. + * Makefile.PL takes care of the higher ones. */ # define VMG_COMPAT_ARRAY_PUSH_NOLEN 1 # endif # ifndef VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID diff --git a/Makefile.PL b/Makefile.PL index d541a7c..a4bd42e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -42,9 +42,10 @@ if ($^V eq v5.8.8) { print $is_as ? "yes\n" : "no\n"; my $is_5110rel = 0; -print "Checking if this is a released perl 5.11.0... "; -if ($^V eq v5.11.0 and not defined $pl) { +print "Checking if this is a released perl 5.11.0 or higher... "; +if ($^V ge v5.11.0 and not defined $pl) { my $describe = $Config{git_describe}; + # An empty 'describe' is fine if (defined $describe and $describe !~ /^GitLive-/) { $is_5110rel = 1; push @DEFINES, '-DVMG_COMPAT_ARRAY_PUSH_NOLEN=0';