summaryrefslogtreecommitdiff
path: root/dump.c
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 /dump.c
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 'dump.c')
-rw-r--r--dump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index 547af9f154..c820687752 100644
--- a/dump.c
+++ b/dump.c
@@ -1277,7 +1277,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
SvREFCNT_dec(d);
return;
}
- if (type >= SVt_PVIV || type == SVt_IV) {
+ if ((type >= SVt_PVIV && type != SVt_PVAV && type != SVt_PVHV)
+ || type == SVt_IV) {
if (SvIsUV(sv)
#ifdef PERL_COPY_ON_WRITE
|| SvIsCOW(sv)
@@ -1296,7 +1297,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
#endif
PerlIO_putc(file, '\n');
}
- if (type >= SVt_PVNV || type == SVt_NV) {
+ if ((type >= SVt_PVNV && type != SVt_PVAV && type != SVt_PVHV)
+ || type == SVt_NV) {
STORE_NUMERIC_LOCAL_SET_STANDARD();
/* %Vg doesn't work? --jhi */
#ifdef USE_LONG_DOUBLE