diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-09-13 17:37:10 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-09-14 11:49:38 +0200 |
commit | 1c4fe6e3136700d9a1a6c4a431fced33f84f5695 (patch) | |
tree | fe62fcaafd45b0dd414dc2826ef8cd0a0ef33ca9 /dist | |
parent | 89fa4092e9eb4b2c39ef338275abc7f5949befd1 (diff) | |
download | perl-1c4fe6e3136700d9a1a6c4a431fced33f84f5695.tar.gz |
Simplify Storable.xs by providing a fallback definition of HvTOTALKEYS().
Longer term this should be added to ppport.h
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Storable/Storable.xs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index 876a323522..38e266db89 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -77,6 +77,10 @@ # define HvPLACEHOLDERS_get HvPLACEHOLDERS #endif +#ifndef HvTOTALKEYS +# define HvTOTALKEYS(hv) HvKEYS(hv) +#endif + #ifdef DEBUGME #ifndef DASSERT @@ -2222,12 +2226,7 @@ sortcmp(const void *a, const void *b) static int store_hash(pTHX_ stcxt_t *cxt, HV *hv) { dVAR; - I32 len = -#ifdef HAS_RESTRICTED_HASHES - HvTOTALKEYS(hv); -#else - HvKEYS(hv); /* Not HvUSEDKEYS, as 5.6 lacketh it */ -#endif + I32 len = HvTOTALKEYS(hv); I32 i; int ret = 0; I32 riter; |