guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix bug #24816: open-string-output-port extraction thunk does no


From: Freja Nordsiek
Subject: [PATCH] Fix bug #24816: open-string-output-port extraction thunk does not truncate string port as expected by R6RS in Guile 2.1.7
Date: Tue, 21 Feb 2017 20:36:20 +0100

Patch for bug #24816: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24816

Patch is for Guile 2.1.7.1 (problem dates back at least as far as 2.1.4).

Problem is that the extraction thunk returned by
open-string-output-port in module "rnrs io ports" does not truncate
the string port as expected by R6RS (page 39 of the library standard
document).

The open-string-output-port procedure (module/rnrs/io/ports.scm) is
changed to make the extraction thunk call truncate-file on the string
port after extracting its contents. In order to make that work, string
ports were made truncatable (libguile/strports.c). A test
(test-suite/tests/r6rs-ports.scm) was added to make sure that the
string port is truncated by the thunk.


Freja Nordsiek

Attachment: 0001-Fixed-bug-where-string-reading-thunk-provided-by-R6R.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]