mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
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.
This commit is contained in:
parent
aa86ae6bf9
commit
af360e5ce5
1 changed files with 2 additions and 2 deletions
|
@ -1778,7 +1778,7 @@ scm_from_port_stringn (const char *str, size_t len, SCM port)
|
||||||
else
|
else
|
||||||
return scm_from_stringn (str, len, scm_i_symbol_chars (pt->encoding),
|
return scm_from_stringn (str, len, scm_i_symbol_chars (pt->encoding),
|
||||||
scm_i_string_failed_conversion_handler
|
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
|
/* 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
|
else
|
||||||
return scm_to_stringn (str, lenp, scm_i_symbol_chars (pt->encoding),
|
return scm_to_stringn (str, lenp, scm_i_symbol_chars (pt->encoding),
|
||||||
scm_i_string_failed_conversion_handler
|
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
|
/* Return a malloc(3)-allocated buffer containing the contents of STR encoded
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue