diff options
author | Karl Williamson <khw@cpan.org> | 2022-10-02 07:38:56 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-10-06 10:15:15 -0600 |
commit | eb70e108736fa063e8fba2e14dcb70e3dacfa9ee (patch) | |
tree | f659cf4ae4075d46961dc1b4cdecf43cc27ca14a /locale.c | |
parent | a6d93489384955135787c629ab114fb3b15b3613 (diff) | |
download | perl-eb70e108736fa063e8fba2e14dcb70e3dacfa9ee.tar.gz |
locale.c: Display thread in DEBUG statements
This makes it easier to understand what's going on in threaded perls.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -121,15 +121,23 @@ static int debug_initialization = 0; # define DEBUG_INITIALIZATION_set(v) (debug_initialization = v) # define DEBUG_LOCALE_INITIALIZATION_ debug_initialization +# ifdef USE_LOCALE_THREADS +# define DEBUG_PRE_STMTS \ + dSAVE_ERRNO; dTHX; PerlIO_printf(Perl_debug_log,"\n%s: %" LINE_Tf ": %p: ",\ + __FILE__, __LINE__, aTHX); +# else +# define DEBUG_PRE_STMTS \ + dSAVE_ERRNO; dTHX; PerlIO_printf(Perl_debug_log, "\n%s: %" LINE_Tf ": ", \ + __FILE__, __LINE__); +# endif +# define DEBUG_POST_STMTS RESTORE_ERRNO; #else # define debug_initialization 0 # define DEBUG_INITIALIZATION_set(v) +# define DEBUG_PRE_STMTS +# define DEBUG_POST_STMTS #endif -#define DEBUG_PRE_STMTS dSAVE_ERRNO; \ - PerlIO_printf(Perl_debug_log, "%s: %" LINE_Tf ": ", __FILE__, __LINE__); -#define DEBUG_POST_STMTS RESTORE_ERRNO; - #include "EXTERN.h" #define PERL_IN_LOCALE_C #include "perl.h" |