diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-23 13:10:56 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-23 13:10:56 +0000 |
commit | be46dfad8454bd0b9f81c4669d39e0b12a423541 (patch) | |
tree | eb21f3deefea81a38b6b6df89517ca1807eae543 /cop.h | |
parent | 58fbde930c2396bd190ab93f5f5a9f12649915c4 (diff) | |
download | perl-be46dfad8454bd0b9f81c4669d39e0b12a423541.tar.gz |
A safer version of CopFILE, by Jarkko
p4raw-id: //depot/perl@31032
Diffstat (limited to 'cop.h')
-rw-r--r-- | cop.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -213,7 +213,8 @@ struct cop { # else # define CopFILEAVx(c) (GvAV(CopFILEGV(c))) # endif -# define CopFILE(c) (CopFILESV(c) ? SvPVX(CopFILESV(c)) : NULL) +# define CopFILE(c) (CopFILEGV(c) && GvSV(CopFILEGV(c)) \ + ? SvPVX(GvSV(CopFILEGV(c))) : NULL) # define CopSTASH(c) ((c)->cop_stash) # define CopLABEL(c) ((c)->cop_label) # define CopSTASH_set(c,hv) ((c)->cop_stash = (hv)) |