From: Vincent Pit Date: Thu, 15 Apr 2010 23:36:27 +0000 (+0200) Subject: {ENTER,LEAVE}_with_name are no longer needed starting perl 5.11.4 X-Git-Tag: v0.20~7 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=commitdiff_plain;h=7ed38ce11d850431de3e4bb48da2452d282bf961;ds=sidebyside {ENTER,LEAVE}_with_name are no longer needed starting perl 5.11.4 --- diff --git a/indirect.xs b/indirect.xs index a38186e..83f778f 100644 --- a/indirect.xs +++ b/indirect.xs @@ -59,15 +59,21 @@ # define HvNAMELEN_get(H) strlen(HvNAME_get(H)) #endif -#ifndef ENTER_with_name -# define ENTER_with_name(N) ENTER -#endif +#define I_HAS_PERL(R, V, S) (PERL_REVISION > (R) || (PERL_REVISION == (R) && (PERL_VERSION > (V) || (PERL_VERSION == (V) && (PERL_SUBVERSION >= (S)))))) -#ifndef LEAVE_with_name -# define LEAVE_with_name(N) LEAVE +#undef ENTERn +#if defined(ENTER_with_name) && !I_HAS_PERL(5, 11, 4) +# define ENTERn(N) ENTER_with_name(N) +#else +# define ENTERn(N) ENTER #endif -#define I_HAS_PERL(R, V, S) (PERL_REVISION > (R) || (PERL_REVISION == (R) && (PERL_VERSION > (V) || (PERL_VERSION == (V) && (PERL_SUBVERSION >= (S)))))) +#undef LEAVEn +#if defined(LEAVE_with_name) && !I_HAS_PERL(5, 11, 4) +# define LEAVEn(N) LEAVE_with_name(N) +#else +# define LEAVEn(N) LEAVE +#endif #if I_HAS_PERL(5, 10, 0) || defined(PL_parser) # ifndef PL_lex_inwhat @@ -890,9 +896,9 @@ CODE: { level = PerlMemShared_malloc(sizeof *level); *level = 1; - LEAVE_with_name("sub"); + LEAVEn("sub"); SAVEDESTRUCTOR_X(indirect_thread_cleanup, level); - ENTER_with_name("sub"); + ENTERn("sub"); } #endif