summaryrefslogtreecommitdiff
path: root/libguile/strports.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2004-08-12 17:45:03 +0000
committerMarius Vollmer <mvo@zagadka.de>2004-08-12 17:45:03 +0000
commit8824ac88f08cffc954a907b85858ccd5b3c9843f (patch)
treec96fa1d142124eaf6f030adbc4ec2eb040b612b0 /libguile/strports.c
parent70f7ee4188c0a752154d8cc63daf5a99ba89951f (diff)
downloadguile-8824ac88f08cffc954a907b85858ccd5b3c9843f.tar.gz
* socket.c, rw.c, deprecated.h, validate.h
(SCM_VALIDATE_STRING_COPY): Deprecated. Replaced all uses with SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or scm_to_locale_string, etc. (SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated. Replaced as above, plus scm_i_get_substring_spec. * regex-posix.c, read.c, random.c, ramap.c, print.c, numbers.c, hash.c, gc.c, gc-card.c, convert.i.c, backtrace.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, unif.c, ports.c: Use SCM_I_STRING_CHARS, SCM_I_STRING_UCHARS, and SCM_I_STRING_LENGTH instead of SCM_STRING_CHARS, SCM_STRING_UCHARS, and SCM_STRING_LENGTH, respectively. Also, replaced scm_return_first with more explicit scm_remember_upto_here_1, etc, or introduced them in the first place.
Diffstat (limited to 'libguile/strports.c')
-rw-r--r--libguile/strports.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libguile/strports.c b/libguile/strports.c
index 70d8e66f0..aa9844bc7 100644
--- a/libguile/strports.c
+++ b/libguile/strports.c
@@ -80,7 +80,7 @@ st_resize_port (scm_t_port *pt, off_t new_size)
{
SCM old_stream = SCM_PACK (pt->stream);
SCM new_stream = scm_allocate_string (new_size);
- unsigned long int old_size = SCM_STRING_LENGTH (old_stream);
+ unsigned long int old_size = SCM_I_STRING_LENGTH (old_stream);
unsigned long int min_size = min (old_size, new_size);
unsigned long int i;
@@ -89,12 +89,14 @@ st_resize_port (scm_t_port *pt, off_t new_size)
pt->write_buf_size = new_size;
for (i = 0; i != min_size; ++i)
- SCM_STRING_CHARS (new_stream) [i] = SCM_STRING_CHARS (old_stream) [i];
+ SCM_I_STRING_CHARS (new_stream) [i] = SCM_I_STRING_CHARS (old_stream) [i];
+
+ scm_remember_upto_here_1 (old_stream);
/* reset buffer. */
{
pt->stream = SCM_UNPACK (new_stream);
- pt->read_buf = pt->write_buf = SCM_STRING_UCHARS (new_stream);
+ pt->read_buf = pt->write_buf = SCM_I_STRING_UCHARS (new_stream);
pt->read_pos = pt->write_pos = pt->write_buf + index;
pt->write_end = pt->write_buf + pt->write_buf_size;
pt->read_end = pt->read_buf + pt->read_buf_size;