diff options
author | Andy Wingo <wingo@pobox.com> | 2013-01-15 14:41:26 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-01-15 16:32:17 +0100 |
commit | 08467a7e6116de5e21e9622b79657e113ce4b072 (patch) | |
tree | cea07109be9e1f95b73a8ec7f42bb01f5721adee /libguile/strports.c | |
parent | 99d716b6f681f5d39288efffd0ee534bb9866fa9 (diff) | |
download | guile-08467a7e6116de5e21e9622b79657e113ce4b072.tar.gz |
add scm_from_port_string and friends
* doc/ref/api-data.texi (Conversion to/from C):
* libguile/strings.h:
* libguile/strings.c (scm_from_port_string, scm_from_port_stringn):
(scm_to_port_string, scm_to_port_stringn): New functions.
* guile-readline/readline.c (internal_readline):
* libguile/strports.c (scm_strport_to_string):
* libguile/read.c (scm_read_number, scm_read_mixed_case_symbol):
(scm_read_number_and_radix, scm_read_character): Use the new
functions.
Diffstat (limited to 'libguile/strports.c')
-rw-r--r-- | libguile/strports.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libguile/strports.c b/libguile/strports.c index 702022740..425b08929 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -1,5 +1,5 @@ /* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, - * 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + * 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -318,8 +318,7 @@ scm_strport_to_string (SCM port) if (pt->read_buf_size == 0) return scm_nullstr; - return scm_from_stringn ((char *)pt->read_buf, pt->read_buf_size, - pt->encoding, pt->ilseq_handler); + return scm_from_port_stringn ((char *)pt->read_buf, pt->read_buf_size, port); } SCM_DEFINE (scm_object_to_string, "object->string", 1, 1, 0, |