diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-08-14 16:46:20 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-08-14 16:46:20 +0100 |
commit | bc337e5c08fd3b2fb5063efa582bb40d199419b1 (patch) | |
tree | c67c8691bfc5a7eed9c4330ca67ae8b435d44e65 /sv.c | |
parent | 1fd8fa480e535be8885c2c1b2e7e95c3aabbdf7f (diff) | |
download | perl-bc337e5c08fd3b2fb5063efa582bb40d199419b1.tar.gz |
Properly reinstate space optimisations to SV body structures.
889d28b2ea2c1751 was incomplete; XPV, XPVIV and XPVNV were returning pointers
correctly offset within the allocated space to align the structures consistent
with XPVMG, but were allocating the full length, not just the used parts.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -920,7 +920,7 @@ static const struct body_details bodies_by_type[] = { SVt_NV, FALSE, HADNV, HASARENA, FIT_ARENA(0, sizeof(NV)) }, /* 8 bytes on most ILP32 with IEEE doubles */ - { sizeof(XPV), + { sizeof(XPV) - STRUCT_OFFSET(XPV, xpv_cur), copy_length(XPV, xpv_len) - STRUCT_OFFSET(XPV, xpv_cur), + STRUCT_OFFSET(XPV, xpv_cur), SVt_PV, FALSE, NONV, HASARENA, @@ -928,7 +928,7 @@ static const struct body_details bodies_by_type[] = { #if 2 *PTRSIZE <= IVSIZE /* 12 */ - { sizeof(XPVIV), + { sizeof(XPVIV) - STRUCT_OFFSET(XPV, xpv_cur), copy_length(XPVIV, xiv_u) - STRUCT_OFFSET(XPV, xpv_cur), + STRUCT_OFFSET(XPV, xpv_cur), SVt_PVIV, FALSE, NONV, HASARENA, @@ -944,7 +944,7 @@ static const struct body_details bodies_by_type[] = { #if (2 *PTRSIZE <= IVSIZE) && (2 *PTRSIZE <= NVSIZE) /* 20 */ - { sizeof(XPVNV), + { sizeof(XPVNV) - STRUCT_OFFSET(XPV, xpv_cur), copy_length(XPVNV, xnv_u) - STRUCT_OFFSET(XPV, xpv_cur), + STRUCT_OFFSET(XPV, xpv_cur), SVt_PVNV, FALSE, HADNV, HASARENA, |