summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-11-14 10:21:49 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-11-14 10:21:49 +0000
commited094fafab5cc8979a919ec8755493543b6bddf5 (patch)
treed3068544a31f301f4c4ebaa5c82faf19fe89c5dd /cop.h
parentff689196a75c2757dfba08a8f95f0eb42fb81136 (diff)
downloadperl-ed094fafab5cc8979a919ec8755493543b6bddf5.tar.gz
sundry cleanups for cloned interpreters (only known failure mode
is due to regexps keeping non-constant data in their compiled structures) p4raw-id: //depot/perl@4579
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cop.h b/cop.h
index d5f7f423a6..af29ff6678 100644
--- a/cop.h
+++ b/cop.h
@@ -39,6 +39,10 @@ struct cop {
# define CopSTASH(c) (CopSTASHPV(c) \
? gv_stashpv(CopSTASHPV(c),GV_ADD) : Nullhv)
# define CopSTASH_set(c,hv) CopSTASHPV_set(c, HvNAME(hv))
+# define CopSTASH_eq(c,hv) (hv \
+ && (CopSTASHPV(c) == HvNAME(hv) \
+ || (CopSTASHPV(c) && HvNAME(hv) \
+ && strEQ(CopSTASHPV(c), HvNAME(hv)))))
#else
# define CopFILEGV(c) ((c)->cop_filegv)
# define CopFILEGV_set(c,gv) ((c)->cop_filegv = gv)
@@ -50,8 +54,10 @@ struct cop {
# define CopSTASH_set(c,hv) ((c)->cop_stash = hv)
# define CopSTASHPV(c) (CopSTASH(c) ? HvNAME(CopSTASH(c)) : Nullch)
# define CopSTASHPV_set(c,pv) CopSTASH_set(c, gv_stashpv(pv,GV_ADD))
+# define CopSTASH_eq(c,hv) (CopSTASH(c) == hv)
#endif /* USE_ITHREADS */
+#define CopSTASH_ne(c,hv) (!CopSTASH_eq(c,hv))
#define CopLINE(c) ((c)->cop_line)
#define CopLINE_inc(c) (++CopLINE(c))
#define CopLINE_dec(c) (--CopLINE(c))