[Top][All Lists]

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

1.8 ‘send’ bug + re-engagement

From: Thien-Thi Nguyen
Subject: 1.8 ‘send’ bug + re-engagement
Date: Fri, 24 Aug 2012 16:21:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Looking to move WIKID[0] out of the Guile 1.4.x ghetto (which is pretty
cozy, i must say), i ran into a Guile 1.8 problem.  Apparently, ‘send’
gratuitously demands its MESSAGE arg (a string) be writable.  This loses
if, e.g., MESSAGE is the result of ‘symbol->string’.  Here is the fix:

 libguile/socket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libguile/socket.c b/libguile/socket.c
index ddc9b0a..964f72c 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -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 ();
Since i've been graciously (re-)granted write privs, i'd like to apply
the fix myself (in the savannah repo), onto ‘branch_release-1-8’.
However, in a fit of thoroughness, i couldn't resist doing some other
changes locally:

$ glog branch_release-1-8.. --reverse
ee70ab6 2012-08-22 Rename to, twice
04d7f4a 2012-08-22 configure, int: Add abstraction: CONFIG_SCRIPT
4bfdc6b 2012-08-23 Delete EOL whitespace; nfc
4099d14 2012-08-23 configure: Dose w/ "proper" m4-quoting
037b7f6 2012-08-22 configure, int: Remove EOF "Local Variables" block; nfc
b3ee840 2012-08-23 configure, int: Add more 'AC_LANG_PROGRAM' calls
ccb98a3 2012-08-23 Delete EOL whitespace; nfc
60a29ff 2012-08-23 libguile: Fix bug: Don't expect 'send' string to be writable
d70f9c8 2012-08-23 Update years in copyright notice; nfc

Note that the fix is the penultimate change (60a29ff).  How about i push
this to ‘ttn-back-in-the-saddle’ for review?  The branch name reflects a
desire to start doing the 1.8 curation that Someone should be doing.
The changes are done in a hybrid ttn-gnu maintainance style.

I imagine if this particular fix goes smoothly, i will be motivated to
continue w/ this kind of maintenance work, where the focus is on
continuity and stability (perhaps likewise showing 1.6 and 1.4 some
love, as well).

I remain confused (and slightly put off) by the "we're worried you'll be
cavalier" warnings mixed with what i perceive as cavalier design
decisions and code changes by the warners, but anyway wish to reassure
everyone that i will limit myself to cleanups (such as those above
listed), bug fixes and doc improvements, all of which are far from
(deep) design.

What do the maintainers think?

Thien-Thi Nguyen ..................................... GPG key: 4C807502
.                  NB: ttn at glug dot org is not me                   .
.                 (and has not been since 2007 or so)                  .
.                        ACCEPT NO SUBSTITUTES                         .
........... please send technical questions to mailing lists ...........

Attachment: pgpsJnv2zsGbS.pgp
Description: PGP signature

reply via email to

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