X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Magic.xs;h=3df5970c6508db8bb94e1e11c8f8e1789dd71ab5;hb=9d92a5b82b92f5f1b31393d4aab400eb68e04f0b;hp=72e6477037ca51ca16bb4854ce455112ebe51d2e;hpb=9841725cf5a9594ab0f8af75af4e7fbd58847f51;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/Magic.xs b/Magic.xs index 72e6477..3df5970 100644 --- a/Magic.xs +++ b/Magic.xs @@ -113,21 +113,22 @@ STATIC SV *vmg_clone(pTHX_ SV *sv, tTHX owner) { # define MGf_LOCAL 0 #endif -/* uvar magic and Hash::Util::FieldHash were commited with p28419 */ +/* uvar magic and Hash::Util::FieldHash were commited with 28419 */ #if VMG_HAS_PERL_MAINT(5, 9, 4, 28419) || VMG_HAS_PERL(5, 10, 0) # define VMG_UVAR 1 #else # define VMG_UVAR 0 #endif -#if !defined(VMG_COMPAT_ARRAY_PUSH_NOLEN) && (VMG_HAS_PERL_BRANCH(5, 8, 9) || VMG_HAS_PERL_MAINT(5, 9, 3, 25854) || VMG_HAS_PERL(5, 10, 0)) +/* Applied to dev-5.9 as 25854, integrated to maint-5.8 as 28160 */ +#if !defined(VMG_COMPAT_ARRAY_PUSH_NOLEN) && (VMG_HAS_PERL_MAINT(5, 8, 9, 28160) || VMG_HAS_PERL_MAINT(5, 9, 3, 25854) || VMG_HAS_PERL(5, 10, 0)) # define VMG_COMPAT_ARRAY_PUSH_NOLEN 1 #else # define VMG_COMPAT_ARRAY_PUSH_NOLEN 0 #endif -/* since 5.9.5 - see #43357 */ -#if VMG_HAS_PERL_BRANCH(5, 8, 9) || VMG_HAS_PERL_MAINT(5, 9, 5, 31473) || VMG_HAS_PERL(5, 10, 0) +/* Applied to dev-5.9 as 31473 (see #43357), integrated to maint-5.8 as 32542 */ +#if VMG_HAS_PERL_MAINT(5, 8, 9, 32542) || VMG_HAS_PERL_MAINT(5, 9, 5, 31473) || VMG_HAS_PERL(5, 10, 0) # define VMG_COMPAT_ARRAY_UNDEF_CLEAR 1 #else # define VMG_COMPAT_ARRAY_UNDEF_CLEAR 0 @@ -248,10 +249,10 @@ STATIC SV *vmg_data_new(pTHX_ SV *ctor, SV *sv, AV *args) { if (count != 1) { croak("Callback needs to return 1 scalar\n"); } nsv = POPs; -#if !VMG_HAS_PERL(5, 8, 2) - nsv = sv_newref(nsv); /* Workaround some bug in SvREFCNT_inc() */ -#else +#if VMG_HAS_PERL(5, 8, 3) SvREFCNT_inc(nsv); /* Or it will be destroyed in FREETMPS */ +#else + nsv = sv_newref(nsv); /* Workaround some bug in SvREFCNT_inc() */ #endif PUTBACK;