From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 325DC1F461 for ; Fri, 17 May 2019 15:43:21 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=VNxoo BvidTWDint00fP+EEUxU6Jqu+hgkbbh46wbweeycSvNPWRciTbQVjedGF8lSgAkV AXxkI24yGgPtEoVGrA0p4tfs1LWVj537/j4LptUiIF/FdF8sOMA1ktWdDUItIMNU PLA+7vG0ixq4YD3HpZbjxeZrtwd2YUf68APpiQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=NLuBwRMeYiH 55PCkvkY1o7AX2+A=; b=Al5Tmoeb4HuqH2qRlG+QLf0RnUBxlfIJJHNJT+1U6AZ oYhpwKcxC+qpV4FJVz29KIH2vKDJA4xTQDfffFl6aiwlSYY0Nj2b7wHRrAlPqAEE UuzzMVW5MZBk5KQbGd8khuWbrAhr3qDWTRkEEBlEslL8Sy46y44TFdYMgj6Hq8sg = Received: (qmail 109203 invoked by alias); 17 May 2019 15:43:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 109194 invoked by uid 89); 17 May 2019 15:43:18 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.redhat.com From: Florian Weimer To: DJ Delorie Cc: libc-alpha@sourceware.org Subject: Re: I'm unhappy about twalk_r References: Date: Fri, 17 May 2019 17:43:08 +0200 In-Reply-To: (DJ Delorie's message of "Tue, 14 May 2019 14:22:18 -0400") Message-ID: <8736ldnl2r.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain * DJ Delorie: > Florian Weimer 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. But it's really an implementation detail, dependent on how the implementation chooses to rebalance the tree (if at all). >> 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. Hmm. Okay. Carlos said something similar, so I'm going to leave it as-is. Thanks, Florian