1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +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:
Thien-Thi Nguyen 2012-08-23 18:17:08 +02:00
parent ccb98a34d4
commit 60a29ffea0

View file

@ -1482,7 +1482,7 @@ SCM_DEFINE (scm_send, "send", 2, 1, 0,
fd = SCM_FPORT_FDES (sock);
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_i_string_stop_writing ();