diff options
author | Marius Vollmer <mvo@zagadka.de> | 2004-08-12 17:16:49 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2004-08-12 17:16:49 +0000 |
commit | 86e14f5c3b3c4b0240381f2805e008334f172c33 (patch) | |
tree | fadc77790fa01311d26d2e6d9db8cc78d19d2438 | |
parent | 4695c759477615b3e103a0c0ed4539e158838142 (diff) | |
download | guile-86e14f5c3b3c4b0240381f2805e008334f172c33.tar.gz |
(scm_fdopen): Use scm_i_fdes_to_port together with scm_i_mode_bits to
avoid accessing internals of SCM string from C.
-rw-r--r-- | libguile/ioext.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libguile/ioext.c b/libguile/ioext.c index 09392c057..22a2de57e 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -32,6 +32,7 @@ #include "libguile/ports.h" #include "libguile/strings.h" #include "libguile/validate.h" +#include "libguile/dynwind.h" #include <fcntl.h> @@ -218,9 +219,8 @@ SCM_DEFINE (scm_fdopen, "fdopen", 2, 0, 0, "same as that accepted by @ref{File Ports, open-file}.") #define FUNC_NAME s_scm_fdopen { - SCM_VALIDATE_STRING (2, modes); - return scm_fdes_to_port (scm_to_int (fdes), - SCM_STRING_CHARS (modes), SCM_BOOL_F); + return scm_i_fdes_to_port (scm_to_int (fdes), + scm_i_mode_bits (modes), SCM_BOOL_F); } #undef FUNC_NAME |