Hi,

Han-Wen Nienhuys <[EMAIL PROTECTED]> 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

Reply via email to