summaryrefslogtreecommitdiff
path: root/cv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-21 22:46:50 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-21 22:46:50 +0000
commite4305a6302fd35f8f8c1a7e612369beaaea58a4a (patch)
tree6ac771d6994c71db69f780e38918c56d399bdfef /cv.h
parent0e66cca035ceb727a3ab9256f4ef9b63b31b7c37 (diff)
downloadperl-e4305a6302fd35f8f8c1a7e612369beaaea58a4a.tar.gz
Add a union in place of xnv_nv, which allows AVs and HVs to re-use
the memory to store pointers and integers. (Part 1 - will be reworked to be more efficient when IV or void* is 64 bit soon) p4raw-id: //depot/perl@24538
Diffstat (limited to 'cv.h')
-rw-r--r--cv.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/cv.h b/cv.h
index 90eef1b1e5..ac9d861429 100644
--- a/cv.h
+++ b/cv.h
@@ -15,7 +15,16 @@ struct xpvcv {
STRLEN xpv_cur; /* length of xp_pv as a C string */
STRLEN xpv_len; /* allocated size */
IV xof_off; /* integer value */
- NV xnv_nv; /* numeric value, if any */
+ union {
+ NV xnvu_nv; /* numeric value, if any */
+ struct {
+ void *xnv_p1;
+ union {
+ void *xnv_p2;
+ IV xnv_i2;
+ } xnv_u2;
+ } xnv_s;
+ } xnv_u;
MAGIC* xmg_magic; /* magic for scalar array */
HV* xmg_stash; /* class package */