From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: port-for-each vs lazy sweep Date: Sun, 26 Aug 2007 19:04:17 +0200 Message-ID: <8764328bxq.fsf@chbouib.org> References: <878x88pbcc.fsf@zip.com.au> <46D0AB14.3030508@xs4all.nl> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1188147960 20345 80.91.229.12 (26 Aug 2007 17:06:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Aug 2007 17:06:00 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Aug 26 19:05:57 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IPLY0-0007W3-UC for guile-devel@m.gmane.org; Sun, 26 Aug 2007 19:05:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPLY0-0003v7-4r for guile-devel@m.gmane.org; Sun, 26 Aug 2007 13:05:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPLXv-0003sR-Ny for guile-devel@gnu.org; Sun, 26 Aug 2007 13:05:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPLXt-0003n8-9x for guile-devel@gnu.org; Sun, 26 Aug 2007 13:05:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPLXt-0003mw-4a for guile-devel@gnu.org; Sun, 26 Aug 2007 13:05:05 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IPLXs-0007ER-Gr for guile-devel@gnu.org; Sun, 26 Aug 2007 13:05:04 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IPLXm-0000gT-CB for guile-devel@gnu.org; Sun, 26 Aug 2007 19:04:58 +0200 Original-Received: from adh419.fdn.fr ([80.67.176.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Aug 2007 19:04:58 +0200 Original-Received: from ludo by adh419.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Aug 2007 19:04:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 58 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: adh419.fdn.fr X-URL: http://www.laas.fr/~lcourtes/ X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: i486-pc-linux-gnu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:sZHWG9SasQjucnqU/z5Ng7zjC5U= X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6754 Archived-At: Hi, Han-Wen Nienhuys writes: > @@ -472,6 +480,7 @@ scm_i_init_guile (SCM_STACKITEM *base) > scm_init_backtrace (); /* Requires fluids */ > scm_init_fports (); > scm_init_strports (); > + scm_init_ports (); > scm_init_gdbint (); /* Requires strports */ > scm_init_hash (); > scm_init_hashtab (); > @@ -490,7 +499,6 @@ scm_i_init_guile (SCM_STACKITEM *base) > scm_init_numbers (); > scm_init_options (); > scm_init_pairs (); > - scm_init_ports (); Why does it need to be moved? > +/* > + We need a global registry of ports to flush them all at exit, and to > + get all the ports matching a file descriptor. > + */ > +SCM scm_i_port_doubly_weak_hash; [...] > - SCM_SETPTAB_ENTRY (port, pt); > + SCM_SETPTAB_ENTRY(port, pt); Please follow GNU style. > -#ifdef GUILE_DEBUG > /* Functions for debugging. */ Why remove the `#ifdef'? > --- a/m4/gnulib-cache.m4 > +++ b/m4/gnulib-cache.m4 > @@ -23,6 +23,7 @@ gl_MODULES([alloca strcase]) > gl_AVOID([]) > gl_SOURCE_BASE([lib]) > gl_M4_BASE([m4]) > +gl_PO_BASE([]) This is unrelated. BTW, instead of using a doubly-weak hash and do "scm_hashq_set_x (scm_i_port_doubly_weak_hash, z, z);", maybe using a weak-key hash table and `#t' as the value would to. "scm_i_port_hash" might be a better name, too. At any rate, that's certainly an improvement. I think this should go in HEAD, but probably not in 1.8. Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel