summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-01-24 15:07:50 +0000
committerNicholas Clark <nick@ccl4.org>2010-05-21 18:56:25 +0100
commit4d0fbddde6c5dcb972786d09de0cab6e93056b88 (patch)
tree5a8c733a77dcda54b0b5e7c184bc1dbfd28ecd3e /hv.h
parentf4431c56525a8650559872ff19c75f109a5d1190 (diff)
downloadperl-4d0fbddde6c5dcb972786d09de0cab6e93056b88.tar.gz
Make HvFILL() count the allocated buckets, instead of reading a stored value.
Add a function Perl_hv_fill to perform the count. This will save 1 IV per hash, and on some systems cause struct xpvhv to become cache aligned.
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/hv.h b/hv.h
index db79b46670..0303b9fbce 100644
--- a/hv.h
+++ b/hv.h
@@ -235,7 +235,7 @@ C<SV*>.
# define Nullhv Null(HV*)
#endif
#define HvARRAY(hv) ((hv)->sv_u.svu_hash)
-#define HvFILL(hv) ((XPVHV*) SvANY(hv))->xhv_fill
+#define HvFILL(hv) Perl_hv_fill(aTHX_ (const HV *)(hv))
#define HvMAX(hv) ((XPVHV*) SvANY(hv))->xhv_max
/* This quite intentionally does no flag checking first. That's your
responsibility. */