From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: mapping.scm and hashx-remove! Date: Thu, 09 Oct 2003 07:16:43 +1000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <871xtnbfb8.fsf@zip.com.au> References: <874qz7yrhc.fsf@zip.com.au> <87vfr17xtq.fsf@zagadka.ping.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1065648282 10617 80.91.224.253 (8 Oct 2003 21:24:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2003 21:24:42 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Oct 08 23:24:40 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A7LnU-0007mv-00 for ; Wed, 08 Oct 2003 23:24:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A7LmH-0005vo-JH for guile-devel@m.gmane.org; Wed, 08 Oct 2003 17:23:25 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1A7LkT-0004DX-TQ for guile-devel@gnu.org; Wed, 08 Oct 2003 17:21:34 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1A7Ljv-0003Fa-7c for guile-devel@gnu.org; Wed, 08 Oct 2003 17:21:30 -0400 Original-Received: from [61.8.0.36] (helo=snoopy.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.24) id 1A7Lic-0002Tx-0x for guile-devel@gnu.org; Wed, 08 Oct 2003 17:19:38 -0400 Original-Received: from mongrel.pacific.net.au (mongrel.pacific.net.au [61.8.0.107]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id h98LJYYH029746; Thu, 9 Oct 2003 07:19:34 +1000 Original-Received: from localhost (ppp120.dyn228.pacific.net.au [203.143.228.120]) by mongrel.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id h98LFlst002603; Thu, 9 Oct 2003 07:15:57 +1000 Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 1A7Lfo-0000sb-00; Thu, 09 Oct 2003 07:16:44 +1000 Original-To: Marius Vollmer Mail-Copies-To: never In-Reply-To: <87vfr17xtq.fsf@zagadka.ping.de> (Marius Vollmer's message of "Tue, 07 Oct 2003 19:38:09 +0200") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2859 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2859 Marius Vollmer writes: > > Right. Can you write a test case for this and fix it? That would be > great! I added some words to the todo file instead. The functions taken by hashx_remove seem sub-optimal. - hashx-remove!, corresponding to other hash*-remove! functions. scm_hashx_remove_x exists, but has never been documented, and might be non-functional (looks like it's missing "&closure" in the scm_hash_fn_remove_x call). Might want to think about the procedures taken. Separate assoc and delete! suit existing such functions, but it's wasteful to traverse a bucket list once to see if an element exists, then again to delete it. Think about maybe a function returning both a modified list and a flag indicating whether a delete was done. Or maybe just returning the list tail of the target element. - mapping.scm hash-table-mapping-hooks uses hashx-create-handle, which doesn't exist. Probably a typo for hashx-create-handle!, just wants to get a little test program to exercise it. - mapping.scm hash-table-mapping-hooks uses hashx-get-handle in its constructed delete-proc, which is probably meant to be hashx-remove!, if/when such a function exists. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel