From: DJ Delorie <dj@redhat.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: I'm unhappy about twalk_r
Date: Tue, 14 May 2019 14:22:18 -0400 [thread overview]
Message-ID: <xnimucdhgl.fsf@greed.delorie.com> (raw)
In-Reply-To: <874l5x44tb.fsf@oldenburg2.str.redhat.com> (message from Florian Weimer on Tue, 14 May 2019 14:08:00 +0200)
Florian Weimer <fweimer@redhat.com> writes:
> Exposing this information using the VISIT argument seems wrong to me.
I agree. It would be more useful if the binary-ness of the tree were
*more* exposed, so the user could take advatage of the walk-order, but
we don't expose it.
> I think this is much more useful: It avoids pointless repeated calls to
> ACTION, and it allows premature termination of the iteration.
twalk() is defined by POSIX. If we have a *_r version of it, it should
conform to the POSIX definition as closely as we can, despite these
inefficiencies.
Perhaps we could add a twalk_find_r() function that does something
between twalk and tfind? Or twalk_sorted_r()? Or something else not
called twalk_r()?
Of course, that assumes that we have a need for a walk-no-find function
that isn't already solved by either twalk or tfind.
next prev parent reply other threads:[~2019-05-14 18:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-14 12:08 I'm unhappy about twalk_r Florian Weimer
2019-05-14 18:22 ` DJ Delorie [this message]
2019-05-14 19:50 ` Adhemerval Zanella
2019-05-17 15:43 ` Florian Weimer
2019-05-14 20:40 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xnimucdhgl.fsf@greed.delorie.com \
--to=dj@redhat.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).