summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-04-02 11:17:58 +0000
committerNicholas Clark <nick@ccl4.org>2006-04-02 11:17:58 +0000
commit623e66097f3d3c76e4fbfed49657029a98953c17 (patch)
tree4304a16273ac0891e56eafbcf6a80baef63a7fdb /cop.h
parent38ab35f8085a56081a4dbd8b974815dee28ebfd1 (diff)
downloadperl-623e66097f3d3c76e4fbfed49657029a98953c17.tar.gz
Abstract all reads/writes of the hints in COPs with 2 new macros,
CopHINTS_get() and CopHINTS_set(). p4raw-id: //depot/perl@27677
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cop.h b/cop.h
index da9fd5b689..fc69b916fe 100644
--- a/cop.h
+++ b/cop.h
@@ -234,6 +234,13 @@ struct cop {
#define CopARYBASE_get(c) ((c)->cop_arybase + 0)
#define CopARYBASE_set(c, b) STMT_START { (c)->cop_arybase = (b); } STMT_END
+/* FIXME NATIVE_HINTS if this is changed from op_private (see perl.h) */
+#define CopHINTS_get(c) ((c)->op_private + 0)
+#define CopHINTS_set(c, h) STMT_START { \
+ (c)->op_private \
+ = (U8)((h) & HINT_PRIVATE_MASK); \
+ } STMT_END
+
/*
* Here we have some enormously heavy (or at least ponderous) wizardry.
*/