[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: port-for-each vs lazy sweep
From: |
Ludovic Courtès |
Subject: |
Re: port-for-each vs lazy sweep |
Date: |
Sun, 26 Aug 2007 19:04:17 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Hi,
Han-Wen Nienhuys <address@hidden> 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.
Re: port-for-each vs lazy sweep, Han-Wen Nienhuys, 2007/08/25
Re: port-for-each vs lazy sweep, Han-Wen Nienhuys, 2007/08/25
Re: port-for-each vs lazy sweep, Kevin Ryde, 2007/08/28