#define __PACKAGE__ "Thread::Cleanup"
#define __PACKAGE_LEN__ (sizeof(__PACKAGE__)-1)
-#ifndef ENTER_with_name
-# define ENTER_with_name(N) ENTER
+#define TC_HAS_PERL(R, V, S) (PERL_REVISION > (R) || (PERL_REVISION == (R) && (PERL_VERSION > (V) || (PERL_VERSION == (V) && (PERL_SUBVERSION >= (S))))))
+
+#undef ENTERn
+#if defined(ENTER_with_name) && !TC_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) && !TC_HAS_PERL(5, 11, 4)
+# define LEAVEn(N) LEAVE_with_name(N)
+#else
+# define LEAVEn(N) LEAVE
#endif
STATIC void tc_callback(pTHX_ void *);
{
level = PerlMemShared_malloc(sizeof *level);
*level = 1;
- LEAVE_with_name("sub");
+ LEAVEn("sub");
SAVEDESTRUCTOR_X(tc_callback, level);
- ENTER_with_name("sub");
+ ENTERn("sub");
}