From af360e5ce5c63c475d4016c7b9f558fd527b892b Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 25 Aug 2016 16:16:39 +0200 Subject: [PATCH] Tweak to conversion strategy access * libguile/strings.c (scm_from_port_stringn, scm_to_port_stringn): Access the conversion_strategy directly to make sure these functions can run while the port is flushing on close. Fixes web-http.test to allow the closed flag to be atomically cleared on a port before flushing. --- libguile/strings.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libguile/strings.c b/libguile/strings.c index dc2e4f5fe..232ddf90e 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1778,7 +1778,7 @@ scm_from_port_stringn (const char *str, size_t len, SCM port) else return scm_from_stringn (str, len, scm_i_symbol_chars (pt->encoding), scm_i_string_failed_conversion_handler - (scm_port_conversion_strategy (port))); + (SCM_PORT (port)->conversion_strategy)); } /* Create a new scheme string from the C string STR. The memory of @@ -2217,7 +2217,7 @@ scm_to_port_stringn (SCM str, size_t *lenp, SCM port) else return scm_to_stringn (str, lenp, scm_i_symbol_chars (pt->encoding), scm_i_string_failed_conversion_handler - (scm_port_conversion_strategy (port))); + (SCM_PORT (port)->conversion_strategy)); } /* Return a malloc(3)-allocated buffer containing the contents of STR encoded