| Store | Cart

[perl #121418] Fwd: [PATCH] hv_iterinit return value documented wrong?

From: James E Keenan via RT <perl...@perl.org>
Sun, 26 Feb 2017 14:46:48 -0800
On Wed, 12 Mar 2014 20:49:38 GMT, davem wrote:
> On Tue, Mar 11, 2014 at 01:17:04PM -0700, Matthew Horsfall wrote:> > hv_iterinit's docs say:> >> > hv_iterinit> >         Prepares a starting point to traverse a hash table.  Returns> >         the number of keys in the hash (i.e. the same as> >         "HvUSEDKEYS(hv)").> >> > But it actually returns HvTOTALKEYS(hv).> > The only use of its return value in core is as a boolean: i.e. it's> used> to determine whether iterating will never return any values, and thus> never bother calling hv_iternext(). Now, since hv_iternext_flags() can> indicate via a flag whether or not to skip over placeholders, I think> the> most conservative approach is to include placeholders in the returned> count; i.e. return HvTOTALKEYS().> > So I conclude that the docs need fixing.

Can we get an update on the status of the patches originally submitted by Matt in this RT?

The first patch is documentation-only (though the location of that documentation within the file has changed).

The second is a C-level source code change (which I think we would have to defer until after code freeze).

Thank you very much.
-- 
James E Keenan (jkee...@cpan.org)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=121418

Recent Messages in this Thread
James E Keenan via RT Feb 28, 2017 12:55 pm
James E Keenan via RT Feb 26, 2017 10:46 pm
Dave Mitchell Feb 28, 2017 08:30 am
Karl Williamson Feb 28, 2017 04:11 pm
Messages in this thread