1 /* This file is part of the Thread::Cleanup Perl module.
2 * See http://search.cpan.org/dist/Thread-Cleanup/ */
4 #define PERL_NO_GET_CONTEXT
9 #define __PACKAGE__ "Thread::Cleanup"
10 #define __PACKAGE_LEN__ (sizeof(__PACKAGE__)-1)
12 #ifndef ENTER_with_name
13 # define ENTER_with_name(N) ENTER
16 #ifndef LEAVE_with_name
17 # define LEAVE_with_name(N) LEAVE
20 STATIC void tc_callback(pTHX_ void *);
22 STATIC void tc_callback(pTHX_ void *ud) {
29 SAVEDESTRUCTOR_X(tc_callback, level);
34 PerlMemShared_free(level);
42 call_pv(__PACKAGE__ "::_CLEANUP", G_VOID | G_EVAL);
51 MODULE = Thread::Cleanup PACKAGE = Thread::Cleanup
61 level = PerlMemShared_malloc(sizeof *level);
63 LEAVE_with_name("sub");
64 SAVEDESTRUCTOR_X(tc_callback, level);
65 ENTER_with_name("sub");