svn commit: r286484 - projects/collation/usr.bin/localedef
Bruce Simpson
bms at fastmail.net
Wed Aug 12 18:35:45 UTC 2015
On 12/08/15 19:27, Baptiste Daroussin wrote:
> On Wed, Aug 12, 2015 at 01:22:17PM -0400, Davide Italiano wrote:
>>> +#define RB_NUMNODES(type, name, head, cnt) do { \
>>> + type *t; \
>>> + cnt = 0; \
>>> + RB_FOREACH(t, name, head) { \
>>> + cnt++; \
>>> + } \
>>> +} while (0);
>>> +
>>
>> Can you commit this one to HEAD && move it to the right header?
>>
> You mean adding to tree(3)?
Not sure why you'd want to pollute it by doing this. The macro is simple
enough that anyone can write it, and it is often best to count RB nodes
whilst doing something else (or lazy-update) to avoid unnecessary
traversals.
More information about the svn-src-projects
mailing list