summaryrefslogtreecommitdiff
path: root/deb.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-11-01 17:09:44 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-11-01 17:09:44 +0000
commitcc49e20bd7575d1d37e92731860d63daa4d52ecc (patch)
tree1b460232564e19658a102bc3cd67d08e537a5c8f /deb.c
parent625a29bd030689ee3f060be950e2f2ffc93c94c9 (diff)
downloadperl-cc49e20bd7575d1d37e92731860d63daa4d52ecc.tar.gz
macros for COP.cop_filegv access
p4raw-id: //depot/perl@4505
Diffstat (limited to 'deb.c')
-rw-r--r--deb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/deb.c b/deb.c
index 10b52cf49d..0eaa056f58 100644
--- a/deb.c
+++ b/deb.c
@@ -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 */