summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-08-29 10:17:07 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-30 01:17:25 +0000
commitb92b71b64040b785ab0dbae065cee6906cc0290f (patch)
tree88995923a31473726c9377d0b74421e9fedba57f /cop.h
parent1fcbf6f0ee3101ab2ae4c8b4b899c604a26bca50 (diff)
downloadperl-b92b71b64040b785ab0dbae065cee6906cc0290f.tar.gz
Re: [ID 20000829.020] perl -e 'package; print __PACKAGE__' core dumps
Message-Id: <200008300017.RAA25382@smtp3.ActiveState.com> p4raw-id: //depot/perl@6909
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cop.h b/cop.h
index 4fbcf263a4..5b47884cb8 100644
--- a/cop.h
+++ b/cop.h
@@ -35,10 +35,10 @@ struct cop {
# define CopFILEAV(c) (CopFILE(c) \
? GvAV(gv_fetchfile(CopFILE(c))) : Nullav)
# define CopSTASHPV(c) ((c)->cop_stashpv)
-# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = savepv(pv))
+# define CopSTASHPV_set(c,pv) ((c)->cop_stashpv = ((pv) ? savepv(pv) : Nullch))
# define CopSTASH(c) (CopSTASHPV(c) \
? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
-# define CopSTASH_set(c,hv) CopSTASHPV_set(c, HvNAME(hv))
+# define CopSTASH_set(c,hv) CopSTASHPV_set(c, (hv) ? HvNAME(hv) : Nullch)
# define CopSTASH_eq(c,hv) ((hv) \
&& (CopSTASHPV(c) == HvNAME(hv) \
|| (CopSTASHPV(c) && HvNAME(hv) \