]> git.vpit.fr Git - perl/modules/Thread-Cleanup.git/commitdiff
Fix for {ENTER,LEAVE}_with_name
authorVincent Pit <vince@profvince.com>
Tue, 29 Dec 2009 16:36:52 +0000 (17:36 +0100)
committerVincent Pit <vince@profvince.com>
Tue, 29 Dec 2009 16:36:52 +0000 (17:36 +0100)
Cleanup.xs

index cc55d59e98eec3206bb0b6b3afbce854c8555372..948c38f767fa36330cb694dcb32f8c98386eb615 100644 (file)
@@ -9,6 +9,14 @@
 #define __PACKAGE__     "Thread::Cleanup"
 #define __PACKAGE_LEN__ (sizeof(__PACKAGE__)-1)
 
 #define __PACKAGE__     "Thread::Cleanup"
 #define __PACKAGE_LEN__ (sizeof(__PACKAGE__)-1)
 
+#ifndef ENTER_with_name
+# define ENTER_with_name(N) ENTER
+#endif
+
+#ifndef LEAVE_with_name
+# define LEAVE_with_name(N) LEAVE
+#endif
+
 STATIC void tc_callback(pTHX_ void *);
 
 STATIC void tc_callback(pTHX_ void *ud) {
 STATIC void tc_callback(pTHX_ void *);
 
 STATIC void tc_callback(pTHX_ void *ud) {
@@ -52,7 +60,7 @@ CODE:
  {
   level = PerlMemShared_malloc(sizeof *level);
   *level = 1;
  {
   level = PerlMemShared_malloc(sizeof *level);
   *level = 1;
-  LEAVE;
+  LEAVE_with_name("sub");
   SAVEDESTRUCTOR_X(tc_callback, level);
   SAVEDESTRUCTOR_X(tc_callback, level);
-  ENTER;
+  ENTER_with_name("sub");
  }
  }