Closed p5pRT closed 13 years ago
Subject: [PATCH] Clean: Actually use HvUSEDKEYS() instead of HvKEYS() Date: Mon\, 14 Mar 2011 06:57:43 +0000 From: Michael Witten \mfwitten@​gmail\.com
This:
commit 8aacddc1ea3837f8f1a911d90c644451fc7cfc86 Author: Nick Ing-Simmons \nik@​tiuk\.ti\.com Date: Tue Dec 18 15:55:22 2001 +0000
Tidied version of Jeffrey Friedl's \jfriedl@​yahoo\.com restricted hashes - added delete of READONLY value inhibit & test for same - re-tabbed
p4raw-id: //depot/perlio@13760
essentially deprecated HvKEYS() in favor of HvUSEDKEYS(); this is explained in line 144 (now 313) of file `hv.h':
/* * HvKEYS gets the number of keys that actually exist()\, and is provided * for backwards compatibility with old XS code. The core uses HvUSEDKEYS * (keys\, excluding placeholdes) and HvTOTALKEYS (including placeholders) */
This commit simply puts that into practice\, and is equivalent to running the following (at least with a35ef416833511da752c4b5b836b7a8915712aab checked out):
git grep -l HvKEYS | sed /hv.h/d | xargs sed -i s/HvKEYS/HvUSEDKEYS/
Notice that HvKEYS is currently just an alias for HvUSEDKEYS:
$ git show a35ef416833511da752c4b5b836b7a8915712aab:hv.h | sed -n 318p #define HvKEYS(hv) HvUSEDKEYS(hv)
According to `make tests':
All tests successful.
dist/Storable/Storable.xs | 2 +- dist/threads-shared/shared.xs | 2 +- doop.c | 4 ++-- dump.c | 8 ++++---- ext/B/B.xs | 4 ++-- hv.c | 8 ++++---- mg.c | 2 +- mro.c | 2 +- pp.c | 2 +- pp_hot.c | 2 +- t/benchmark/rt26188-speed-up-keys-on-empty-hash.t | 2 +- 11 files changed\, 19 insertions(+)\, 19 deletions(-)
1.7.4.18.g68fe8
Flags: category=core severity=low
On Sun May 15 18:17:06 2011\, mfwitten wrote:
Subject: [PATCH] Clean: Actually use HvUSEDKEYS() instead of HvKEYS() Date: Mon\, 14 Mar 2011 06:57:43 +0000 From: Michael Witten \mfwitten@​gmail\.com
Thank you. Applied as 1b95d04f713d9c56.
The RT System itself - Status changed from 'new' to 'open'
@cpansprout - Status changed from 'open' to 'resolved'
On Wed May 18 16:37:14 2011\, sprout wrote:
On Sun May 15 18:17:06 2011\, mfwitten wrote:
Subject: [PATCH] Clean: Actually use HvUSEDKEYS() instead of HvKEYS() Date: Mon\, 14 Mar 2011 06:57:43 +0000 From: Michael Witten \mfwitten@​gmail\.com
Thank you. Applied as 1b95d04f713d9c56.
Alas\, that stopped Storable from working in 5.6. I’ve just fixed it with commit b33df119cd5e3.
Migrated from rt.perl.org#90666 (status was 'resolved')
Searchable as RT90666$