Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 13077 invoked from network); 9 Mar 2010 21:38:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Mar 2010 21:38:50 -0000 Received: (qmail 46978 invoked by uid 500); 9 Mar 2010 21:38:21 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 46904 invoked by uid 500); 9 Mar 2010 21:38:21 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 46897 invoked by uid 99); 9 Mar 2010 21:38:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Mar 2010 21:38:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hyrum_wright@mail.utexas.edu designates 146.6.25.7 as permitted sender) Received: from [146.6.25.7] (HELO ironclad.mail.utexas.edu) (146.6.25.7) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Mar 2010 21:38:20 +0000 DomainKey-Signature: s=main; d=mail.utexas.edu; c=nofws; q=dns; h=X-IronPort-MID:Received:Received:Received:Subject: Mime-Version:Content-Type:From:In-Reply-To:Date:Cc: Content-Transfer-Encoding:Message-Id:References:To: X-Mailer; b=QxMwJBluMsO5yebwI3tnZjpRhlvKkFigAEiZF+9HqYMIsDC9DQvsjnm9 Z16yiyFmLaWuzS5UHguGkJEjnYvmWhXiDzRcaTSJ3UMK2nSxtFLd68JI7 yyEaf3wZZrAX8+fyJ4zmdWk4Vp+L1/ahi4ydgpimWgqROca1RLm0JH7wP 0=; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.utexas.edu; i=hyrum_wright@mail.utexas.edu; q=dns/txt; s=main; t=1268170700; x=1299706700; h=from:sender:reply-to:subject:date:message-id:to:cc: mime-version:content-transfer-encoding:content-id: content-description:resent-date:resent-from:resent-sender: resent-to:resent-cc:resent-message-id:in-reply-to: references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; z=From:=20"Hyrum=20K.=20Wright"=20|Subject:=20Re:=20[PATCH]=20apr_hash_this_{key,klen ,val}|Date:=20Tue,=209=20Mar=202010=2015:37:59=20-0600 |Message-Id:=20|To:=20William=20A.=20Rowe=20Jr.=20|Cc:=20Jeff=20Trawick=20, =0D=0A=20dev@apr.apache.org|Mime-Version:=201.0=20(Apple =20Message=20framework=20v1077) |Content-Transfer-Encoding:=20quoted-printable |In-Reply-To:=20<4B96A8EF.8030401@rowe-clan.net> |References:=20=20=20<4B96A8EF.8030401@rowe-clan.ne t>; bh=Pv+M7Yn7vACMWnw2WaDM6eCf8QkjtogS/aGlZJWy0bQ=; b=wJdRSu3PaMzGTedAghde89a9xhyyYuVKXmnXtz4Qk7sHHmGabUj/rmJT pslB26leXYOi9ib8pZngQ7IEBB0ot3br5wJRt0FkUT8tRbOimE9j25+VA oRPmGEGDalTN96t+I3A1MR7qeJRoxJjB9FuXuoKDwwmcA7GOUSqEfTNB6 A=; X-IronPort-MID: 21437074 Received: from wb3-a.mail.utexas.edu ([128.83.126.138]) by ironclad.mail.utexas.edu with ESMTP; 09 Mar 2010 15:37:59 -0600 Received: (qmail 30583 invoked from network); 9 Mar 2010 21:37:59 -0000 Received: from dhcp-198-227.ece.utexas.edu (hyrum?wright@128.83.198.227) by wb3.mail.utexas.edu with (RC4-SHA encrypted) ESMTPSA; 9 Mar 2010 21:37:59 -0000 Subject: Re: [PATCH] apr_hash_this_{key,klen,val} Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: "Hyrum K. Wright" In-Reply-To: <4B96A8EF.8030401@rowe-clan.net> Date: Tue, 9 Mar 2010 15:37:59 -0600 Cc: Jeff Trawick , dev@apr.apache.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <4B96A8EF.8030401@rowe-clan.net> To: William A. Rowe Jr. X-Mailer: Apple Mail (2.1077) On Mar 9, 2010, at 2:00 PM, William A. Rowe Jr. wrote: > On 3/9/2010 11:48 AM, Jeff Trawick wrote: >> On Tue, Mar 9, 2010 at 11:19 AM, Hyrum K. Wright >> wrote: >>> In using the apr_hash datastructure in Subversion, we've found that = we >>> often only want the key or value from a hash. Furthermore, casting >>> the various return parameters has proven cumbersome. To solve this >>> problem, we've introduced three helper functions to return the key, >>> key length, and value from a hash iterator. >>>=20 >>> We've found these functions quite useful, so I'm including a patch = to >>> add them to APR proper. >>=20 >> IMO these functions are a natural addition; any concerns from the = crowd? >>=20 >>> The patch is against trunk, but if possible, >>> I'd like to see these APIs backported to 1.4.x and 1.5.x. >>=20 >> too late for 1.4.x >=20 > But not 1.5 - sounds like a great idea. Only change I'd suggest is = _key_len > or even _keylen rather than _klen for an exported public function. I'm fine with that. I don't think I've got the appropriate karma to commit to APR, so = whoever commits this patch can make that change (or would it be worse = the hassle for me to create a new patch?). I'm also planning a followup which const-ifies the apr_hash_index_t = params to these functions, as well as apr_hash_this(). Thoughts? -Hyrum=