diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-03-06 11:42:37 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-03-06 23:05:00 +0100 |
commit | 0b2c2ba353d9dcf0b288950b88d6f205a5ec67ab (patch) | |
tree | 80941b1bfb370bb062f70b8751e8c44d5673b931 /libguile/print.c | |
parent | 691fcf66c0a823b2c4f4018e925cf9f338a4de27 (diff) | |
download | guile-0b2c2ba353d9dcf0b288950b88d6f205a5ec67ab.tar.gz |
Let `scm_mkstrport' allocate buffers on the caller's behalf.
* libguile/strports.c (INITIAL_BUFFER_SIZE): New macro.
(scm_mkstrport): If STR is false, allocate a bytevector on the
caller's behalf.
(scm_object_to_string, scm_call_with_output_string,
scm_open_output_string): Pass SCM_BOOL_F as the STR argument of
`scm_mkstrport'.
* libguile/backtrace.c (scm_display_application,
display_backtrace_body): Likewise.
* libguile/gdbint.c (scm_init_gdbint): Likewise.
* libguile/print.c (scm_simple_format): Likewise.
Diffstat (limited to 'libguile/print.c')
-rw-r--r-- | libguile/print.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libguile/print.c b/libguile/print.c index 3855146b1..e3c9e1c92 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -1284,8 +1284,7 @@ SCM_DEFINE (scm_simple_format, "simple-format", 2, 0, 1, else if (scm_is_false (destination)) { fReturnString = 1; - port = scm_mkstrport (SCM_INUM0, - scm_make_string (SCM_INUM0, SCM_UNDEFINED), + port = scm_mkstrport (SCM_INUM0, SCM_BOOL_F, SCM_OPN | SCM_WRTNG, FUNC_NAME); destination = port; |