summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorStas Bekman <stas@stason.org>2004-04-19 11:10:01 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-04-21 08:36:38 +0000
commit472d47bc592782703b1974a20dbd65f617e06414 (patch)
treef60e0e3796052726c476f3f6a3da3200294d14e7 /handy.h
parent0ca33fed0ac502beb86fe06f05e7aeff66a75665 (diff)
downloadperl-472d47bc592782703b1974a20dbd65f617e06414.tar.gz
[patch] log the interpreter id in warnings
Message-ID: <40847869.1000906@stason.org> p4raw-id: //depot/perl@22721
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/handy.h b/handy.h
index b88c729e5f..19a593408e 100644
--- a/handy.h
+++ b/handy.h
@@ -665,3 +665,19 @@ hopefully catches attempts to access uninitialized memory.
# endif
#endif
+/* convenience debug macros */
+#ifdef USE_ITHREADS
+#define pTHX_FORMAT "Perl interpreter: 0x%p"
+#define pTHX__FORMAT ", Perl interpreter: 0x%p"
+#define pTHX_VALUE_ (unsigned long)my_perl,
+#define pTHX_VALUE (unsigned long)my_perl
+#define pTHX__VALUE_ ,(unsigned long)my_perl,
+#define pTHX__VALUE ,(unsigned long)my_perl
+#else
+#define pTHX_FORMAT
+#define pTHX__FORMAT
+#define pTHX_VALUE_
+#define pTHX_VALUE
+#define pTHX__VALUE_
+#define pTHX__VALUE
+#endif /* USE_ITHREADS */