summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-02-15 16:15:11 +0000
committerDavid Mitchell <davem@iabyn.com>2014-02-28 13:42:49 +0000
commit0c22a733be05b5c1393fc9a2e337dbeed2881596 (patch)
treef1970541f1fcb7a3ff4d4eded42d111fd0a385aa /dump.c
parentb024352e692dd231fd32548e325d75b667bff29f (diff)
downloadperl-0c22a733be05b5c1393fc9a2e337dbeed2881596.tar.gz
add aux_flags field to HVs with aux struct
Add an extra U32 general flags field to the xpvhv_aux struct (which is used on HVs such as stashes, that need extra fields). On 64-bit systems, this doesn't consume any extra space since there's already an odd number of I32/U32 fields. On 32-bit systems it will consume an extra 4 bytes. But of course only on those hashes that have the aux struct. As well as providing extra flags in the AUX case, it will also allow us to free up at least one general flag bit for HVs - see next commit.
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dump.c b/dump.c
index 8c14b3bdfc..b5998f9b82 100644
--- a/dump.c
+++ b/dump.c
@@ -1883,6 +1883,11 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
}
break;
case SVt_PVHV:
+ if (SvOOK(sv)) {
+ struct xpvhv_aux *const aux = HvAUX(sv);
+ Perl_dump_indent(aTHX_ level, file, " AUX_FLAGS = %"UVuf"\n",
+ (UV)aux->xhv_aux_flags);
+ }
Perl_dump_indent(aTHX_ level, file, " ARRAY = 0x%"UVxf, PTR2UV(HvARRAY(sv)));
if (HvARRAY(sv) && HvUSEDKEYS(sv)) {
/* Show distribution of HEs in the ARRAY */