X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=Magic.xs;h=db8e2308e4cb630088cbf98d3b7bab7fbe1ba628;hb=refs%2Ftags%2Fv0.38;hp=77b620999cf2a964ad1be719a2f49590701e30ba;hpb=544f8a0bb4359368c34abd3f7c7f9dfc83a3f7f5;p=perl%2Fmodules%2FVariable-Magic.git diff --git a/Magic.xs b/Magic.xs index 77b6209..db8e230 100644 --- a/Magic.xs +++ b/Magic.xs @@ -36,6 +36,11 @@ # define dNOOP #endif +/* Safe unless stated otherwise in Makefile.PL */ +#ifndef VMG_FORKSAFE +# define VMG_FORKSAFE 1 +#endif + #ifndef VMG_MULTIPLICITY # if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT) # define VMG_MULTIPLICITY 1 @@ -143,13 +148,22 @@ STATIC SV *vmg_clone(pTHX_ SV *sv, tTHX owner) { # define VMG_UVAR 0 #endif -/* Applied to dev-5.9 as 25854, integrated to maint-5.8 as 28160 */ -#ifndef VMG_COMPAT_ARRAY_PUSH_NOLEN -# if VMG_HAS_PERL_MAINT(5, 8, 9, 28160) || 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, partially + * 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 # define VMG_COMPAT_ARRAY_PUSH_NOLEN 1 -# else +# endif +# ifndef VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID +# define VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID 1 +# endif +#else +# ifndef VMG_COMPAT_ARRAY_PUSH_NOLEN # define VMG_COMPAT_ARRAY_PUSH_NOLEN 0 # endif +# ifndef VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID +# define VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID 0 +# endif #endif /* Applied to dev-5.11 as 34908 */ @@ -1255,6 +1269,8 @@ BOOT: newCONSTSUB(stash, "VMG_UVAR", newSVuv(VMG_UVAR)); newCONSTSUB(stash, "VMG_COMPAT_ARRAY_PUSH_NOLEN", newSVuv(VMG_COMPAT_ARRAY_PUSH_NOLEN)); + newCONSTSUB(stash, "VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID", + newSVuv(VMG_COMPAT_ARRAY_PUSH_NOLEN_VOID)); newCONSTSUB(stash, "VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID", newSVuv(VMG_COMPAT_ARRAY_UNSHIFT_NOLEN_VOID)); newCONSTSUB(stash, "VMG_COMPAT_ARRAY_UNDEF_CLEAR", @@ -1263,6 +1279,7 @@ BOOT: newSVuv(VMG_COMPAT_SCALAR_LENGTH_NOLEN)); newCONSTSUB(stash, "VMG_PERL_PATCHLEVEL", newSVuv(VMG_PERL_PATCHLEVEL)); newCONSTSUB(stash, "VMG_THREADSAFE", newSVuv(VMG_THREADSAFE)); + newCONSTSUB(stash, "VMG_FORKSAFE", newSVuv(VMG_FORKSAFE)); newCONSTSUB(stash, "VMG_OP_INFO_NAME", newSVuv(VMG_OP_INFO_NAME)); newCONSTSUB(stash, "VMG_OP_INFO_OBJECT", newSVuv(VMG_OP_INFO_OBJECT)); }