]> git.vpit.fr Git - perl/modules/Lexical-Types.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:32:33 +0000 (01:32 +0200)
committerVincent Pit <vince@profvince.com>
Thu, 15 Apr 2010 23:32:33 +0000 (01:32 +0200)
Types.xs

index 03efb236089942a478ce22e30dc1c43d99bbfcc8..0a13cdb88caf7c94517d61d6188349c1e15a604c 100644 (file)
--- a/Types.xs
+++ b/Types.xs
 # define SvREFCNT_inc_simple_NN SvREFCNT_inc
 #endif
 
-#ifndef ENTER_with_name
-# define ENTER_with_name(N) ENTER
+#undef ENTERn
+#if defined(ENTER_with_name) && !LT_HAS_PERL(5, 11, 4)
+# define ENTERn(N) ENTER_with_name(N)
+#else
+# define ENTERn(N) ENTER
 #endif
 
-#ifndef LEAVE_with_name
-# define LEAVE_with_name(N) LEAVE
+#undef LEAVEn
+#if defined(LEAVE_with_name) && !LT_HAS_PERL(5, 11, 4)
+# define LEAVEn(N) LEAVE_with_name(N)
+#else
+# define LEAVEn(N) LEAVE
 #endif
 
 /* ... Thread safety and multiplicity ...................................... */
@@ -754,9 +760,9 @@ PPCODE:
  {
   level = PerlMemShared_malloc(sizeof *level);
   *level = 1;
-  LEAVE_with_name("sub");
+  LEAVEn("sub");
   SAVEDESTRUCTOR_X(lt_thread_cleanup, level);
-  ENTER_with_name("sub");
+  ENTERn("sub");
  }
  XSRETURN(0);