diff options
author | Andy Wingo <wingo@pobox.com> | 2023-05-27 21:51:57 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2023-06-08 09:03:10 +0200 |
commit | 1852fbfef99c99090b4508918565ef19a345a7ab (patch) | |
tree | 5abe3dbd514a611fa99a55b0c6654e84f12a691c /libguile/init.c | |
parent | 67dbc60e8f5a839aaaf3b218744d026165ac1cdf (diff) | |
download | guile-1852fbfef99c99090b4508918565ef19a345a7ab.tar.gz |
Add "custom ports"
Custom ports are a kind of port that exposes the C port type interface
directly to Scheme. In this way the full capability of C is available
to Scheme, and also the read and write functions can be tail-called from
Scheme (via port-read / port-write).
* libguile/custom-ports.c:
* libguile/custom-ports.h:
* module/ice-9/custom-ports.scm: New files.
* libguile/init.c:
* libguile/Makefile.am:
* am/bootstrap.am: Add to the build.
* doc/ref/api-io.texi: Update the manual.
Diffstat (limited to 'libguile/init.c')
-rw-r--r-- | libguile/init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libguile/init.c b/libguile/init.c index b0a39e6d4..da3d2f0b7 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -1,4 +1,4 @@ -/* Copyright 1995-2004,2006,2009-2014,2016-2020 +/* Copyright 1995-2004,2006,2009-2014,2016-2021,2023 Free Software Foundation, Inc. This file is part of Guile. @@ -52,6 +52,7 @@ #include "chars.h" #include "continuations.h" #include "control.h" +#include "custom-ports.h" #include "debug.h" #ifdef GUILE_DEBUG_MALLOC #include "debug-malloc.h" @@ -373,6 +374,7 @@ scm_i_init_guile (void *base) scm_bootstrap_programs (); scm_bootstrap_vm (); scm_register_atomic (); + scm_register_custom_ports (); scm_register_fdes_finalizers (); scm_register_foreign (); scm_register_foreign_object (); |