summaryrefslogtreecommitdiff
path: root/libguile/gdbint.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-03-06 11:42:37 +0100
committerLudovic Courtès <ludo@gnu.org>2011-03-06 23:05:00 +0100
commit0b2c2ba353d9dcf0b288950b88d6f205a5ec67ab (patch)
tree80941b1bfb370bb062f70b8751e8c44d5673b931 /libguile/gdbint.c
parent691fcf66c0a823b2c4f4018e925cf9f338a4de27 (diff)
downloadguile-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/gdbint.c')
-rw-r--r--libguile/gdbint.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libguile/gdbint.c b/libguile/gdbint.c
index 7cc9535d7..77fdbd17a 100644
--- a/libguile/gdbint.c
+++ b/libguile/gdbint.c
@@ -1,5 +1,5 @@
/* GDB interface for Guile
- * Copyright (C) 1996,1997,1999,2000,2001,2002,2004,2009
+ * Copyright (C) 1996,1997,1999,2000,2001,2002,2004,2009,2011
* Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -248,15 +248,13 @@ scm_init_gdbint ()
SCM port;
scm_print_carefully_p = 0;
-
- port = scm_mkstrport (SCM_INUM0,
- scm_c_make_string (0, SCM_UNDEFINED),
+
+ port = scm_mkstrport (SCM_INUM0, SCM_BOOL_F,
SCM_OPN | SCM_WRTNG,
s);
gdb_output_port = scm_permanent_object (port);
-
- port = scm_mkstrport (SCM_INUM0,
- scm_c_make_string (0, SCM_UNDEFINED),
+
+ port = scm_mkstrport (SCM_INUM0, SCM_BOOL_F,
SCM_OPN | SCM_RDNG | SCM_WRTNG,
s);
gdb_input_port = scm_permanent_object (port);