mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
libguile: Fix bug: Don't expect 'send' string to be writable
Expecting writable strings fails if the string is the result of 'symbol->string', for example. * libguile/socket.c (scm_send): Use 'scm_i_string_chars'.
This commit is contained in:
parent
ccb98a34d4
commit
60a29ffea0
1 changed files with 1 additions and 1 deletions
|
@ -1482,7 +1482,7 @@ SCM_DEFINE (scm_send, "send", 2, 1, 0,
|
||||||
fd = SCM_FPORT_FDES (sock);
|
fd = SCM_FPORT_FDES (sock);
|
||||||
|
|
||||||
len = scm_i_string_length (message);
|
len = scm_i_string_length (message);
|
||||||
src = scm_i_string_writable_chars (message);
|
src = scm_i_string_chars (message);
|
||||||
SCM_SYSCALL (rv = send (fd, src, len, flg));
|
SCM_SYSCALL (rv = send (fd, src, len, flg));
|
||||||
scm_i_string_stop_writing ();
|
scm_i_string_stop_writing ();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue