summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-11-14 17:10:01 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-11-14 17:10:01 +0000
commit02d018713874e7295a5030d0f39a8ee25606639d (patch)
tree15f9eb201a3dab75cdf656154f0c7efed29fa151 /cop.h
parentbd9b35c97ad661cc06e68f6193733424fc65c9c0 (diff)
parented094fafab5cc8979a919ec8755493543b6bddf5 (diff)
downloadperl-02d018713874e7295a5030d0f39a8ee25606639d.tar.gz
Integrate with Sarathy.
p4raw-id: //depot/cfgperl@4582
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))