summaryrefslogtreecommitdiff
path: root/pad.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-12-28 20:02:03 +0000
committerNicholas Clark <nick@ccl4.org>2006-12-28 20:02:03 +0000
commit809abb02185a4df0f7a1a043727bae7a5c08a798 (patch)
treed5ee2595ce831251356648e229505494fb0e809e /pad.h
parentfc83298a3a621f1e679e6f21aceaef1ab9198bc1 (diff)
downloadperl-809abb02185a4df0f7a1a043727bae7a5c08a798.tar.gz
Abstract the pad code's overloaded use of SvNVX and SvIVX into
4 macros COP_SEQ_RANGE_LOW, COP_SEQ_RANGE_HIGH, PARENT_PAD_INDEX and PARENT_FAKELEX_FLAGS p4raw-id: //depot/perl@29629
Diffstat (limited to 'pad.h')
-rw-r--r--pad.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/pad.h b/pad.h
index 26d4e7a75b..d057211914 100644
--- a/pad.h
+++ b/pad.h
@@ -30,7 +30,15 @@ typedef U64TYPE PADOFFSET;
# endif
#endif
#define NOT_IN_PAD ((PADOFFSET) -1)
-
+
+/* B.xs needs these for the benefit of B::Deparse */
+/* Low range end is exclusive (valid from the cop seq after this one) */
+#define COP_SEQ_RANGE_LOW(sv) U_32(SvNVX(sv))
+/* High range end is inclusive (valid up to this cop seq) */
+#define COP_SEQ_RANGE_HIGH(sv) U_32(SvUVX(sv))
+
+#define PARENT_PAD_INDEX(sv) U_32(SvNVX(sv))
+#define PARENT_FAKELEX_FLAGS(sv) U_32(SvUVX(sv))
/* flags for the pad_new() function */