]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/commitdiff
{ENTER,LEAVE}_with_name are no longer needed starting perl 5.11.4
authorVincent Pit <vince@profvince.com>
Thu, 15 Apr 2010 23:41:34 +0000 (01:41 +0200)
committerVincent Pit <vince@profvince.com>
Thu, 15 Apr 2010 23:41:34 +0000 (01:41 +0200)
Plugin.xs

index c1272d91dcc8c66df872436175f24c6f4fc0236c..d64951ea73016f3fcdc3a5dec3d0404c43246b0a 100644 (file)
--- a/Plugin.xs
+++ b/Plugin.xs
 #define __PACKAGE__     "re::engine::Plugin"
 #define __PACKAGE_LEN__ (sizeof(__PACKAGE__)-1)
 
-#ifndef ENTER_with_name
-# define ENTER_with_name(N) ENTER
-#endif
+#define REP_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) && !REP_HAS_PERL(5, 11, 4)
+# define ENTERn(N) ENTER_with_name(N)
+#else
+# define ENTERn(N) ENTER
 #endif
 
-#define REP_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) && !REP_HAS_PERL(5, 11, 4)
+# define LEAVEn(N) LEAVE_with_name(N)
+#else
+# define LEAVEn(N) LEAVE
+#endif
 
 #ifndef REP_WORKAROUND_REQUIRE_PROPAGATION
 # define REP_WORKAROUND_REQUIRE_PROPAGATION !REP_HAS_PERL(5, 10, 1)
@@ -668,9 +674,9 @@ CODE:
     {
        level = PerlMemShared_malloc(sizeof *level);
        *level = 1;
-       LEAVE_with_name("sub");
+       LEAVEn("sub");
        SAVEDESTRUCTOR_X(rep_thread_cleanup, level);
-       ENTER_with_name("sub");
+       ENTERn("sub");
     }
 
 #endif