From owner-svn-src-projects@freebsd.org Wed Aug 12 18:35:45 2015 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35C739A0BAA for ; Wed, 12 Aug 2015 18:35:45 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03BF7C62 for ; Wed, 12 Aug 2015 18:35:44 +0000 (UTC) (envelope-from bms@fastmail.net) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 7762421AF5 for ; Wed, 12 Aug 2015 14:35:43 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Wed, 12 Aug 2015 14:35:43 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=SbHNTjWAsvt5IARc5dy3PFuNlyI=; b=ASHul5 /GwKsHuywKO8b5kTBeyHwndvnDB2E0C7mdJ8ayM8f4jlI65eKMgzIg+DrOaAoX+N aXw3CHdsZ5Ep9MOuBH/rQ5eJwrUcCylRTjZS/R7szHLmoOa3j860bXinIBQAnyP7 43IWeHnFAehqTZSGtAaTSD8xo286GVfI0zrU8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=SbHNTjWAsvt5IAR c5dy3PFuNlyI=; b=AqG4FrcZP+IJLuoIyvcYlvfyqj2RyPgcEU953M4CKrM8hng RX+P+Q91Ak+5Sf6vg8IvZRsjzoNJ2hCygbq6Vnsro2oC/Av93AWlHI0HMH3TcfcW 3BQmEtw/bvhp7k/JtH6f4KO7djajjO9VDnu+Jix+SYVXtI9+3GkSrcre1L6Q= X-Sasl-enc: YD+vQRuFAHhqBwLJ/i4PaDQf9XNU1fVynDY5dsHld3db 1439404543 Received: from pion.local (host81-148-185-20.in-addr.btopenworld.com [81.148.185.20]) by mail.messagingengine.com (Postfix) with ESMTPA id 62478C00014; Wed, 12 Aug 2015 14:35:42 -0400 (EDT) Message-ID: <55CB91FD.8000004@fastmail.net> Date: Wed, 12 Aug 2015 19:35:41 +0100 From: Bruce Simpson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Baptiste Daroussin , Davide Italiano CC: "src-committers@freebsd.org" , svn-src-projects@freebsd.org Subject: Re: svn commit: r286484 - projects/collation/usr.bin/localedef References: <201508082257.t78MvIT1000841@repo.freebsd.org> <20150812182739.GB51754@ivaldir.etoilebsd.net> In-Reply-To: <20150812182739.GB51754@ivaldir.etoilebsd.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2015 18:35:45 -0000 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.