diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-01 17:09:44 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-11-01 17:09:44 +0000 |
commit | cc49e20bd7575d1d37e92731860d63daa4d52ecc (patch) | |
tree | 1b460232564e19658a102bc3cd67d08e537a5c8f /deb.c | |
parent | 625a29bd030689ee3f060be950e2f2ffc93c94c9 (diff) | |
download | perl-cc49e20bd7575d1d37e92731860d63daa4d52ecc.tar.gz |
macros for COP.cop_filegv access
p4raw-id: //depot/perl@4505
Diffstat (limited to 'deb.c')
-rw-r--r-- | deb.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -47,17 +47,16 @@ Perl_vdeb(pTHX_ const char *pat, va_list *args) #ifdef DEBUGGING dTHR; register I32 i; - GV* gv = PL_curcop->cop_filegv; + char* file = CopFILE(PL_curcop); #ifdef USE_THREADS PerlIO_printf(Perl_debug_log, "0x%"UVxf" (%s:%ld)\t", PTR2UV(thr), - SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "<free>", - (long)PL_curcop->cop_line); + (file ? file : "<free>"), + (long)CopLINE(PL_curcop)); #else - PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", - SvTYPE(gv) == SVt_PVGV ? SvPVX(GvSV(gv)) : "<free>", - (long)PL_curcop->cop_line); + PerlIO_printf(Perl_debug_log, "(%s:%ld)\t", (file ? file : "<free>"), + (long)CopLINE(PL_curcop)); #endif /* USE_THREADS */ (void) PerlIO_vprintf(Perl_debug_log, pat, *args); #endif /* DEBUGGING */ |