bug-guile
[Top][All Lists]
Advanced

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

Re: [Bug-autogen] test failure with guile-2.0.2


From: Bruce Korb
Subject: Re: [Bug-autogen] test failure with guile-2.0.2
Date: Mon, 11 Jul 2011 06:28:18 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

Hi Elias, et al.,

On 07/09/11 15:11, Elias Pipping wrote:
with autogen 5.12 and guile [top of tree] I get a test failure that
I do not get with the same version of autogen and guile 2.0.2.

The failing test is string.test.

It fails because instead of ending with \001\002\003\377 as expected,
a generated string ends with \001\002\003?. I'm attaching the relevant
output. Here's a snippet passed through `od -c`:

0002060   h   a   s   s   l   e   "   . 001 002 003 377  \r  \n   '<
0002260   h   a   s   s   l   e   "   . 001 002 003   ?  \r  \n   '<

where the first line is expected and the second line is what's
actually returned.

I'm also attaching a script that reproduces the problem and can be run
from inside a checkout of the guile git repository. It builds guile,
installs it to a temporary location, then builds autogen 5.12 and
makes it use that version of guile; In conjunction with git-bisect,
this revealed that the following commit is to blame:

commit 95f5e303bc7f6174255b12fd1113d69364863762
Author: Andy Wingo<address@hidden>
Date:   Thu Mar 17 18:29:08 2011 +0100

     scm_{to,from}_locale_string use current locale, not current ports

     * libguile/strings.c (scm_to_locale_stringn, scm_from_locale_stringn):
       Use the encoding of the current locale, not of the current i/o ports.
       Also use the current conversion strategy.

     * doc/ref/api-data.texi (Conversion to/from C): Update docs.

See also [1].

The intent is that I have several functions:  raw-shell-str, shell-str,
c-string and kr-string each of which produces precisely the same byte
sequence as their argument for the intended target environment.

The first two produce text that, when processed by the shell and passed
through as arguments to a program, will be seen by the program as
identical to the original string handed off to the guile function.
Similarly, c-string and kr-string will produce C variable initialization
text that, after compilation, the compiled program will see the exact
same sequence of bytes given to guile to hand off to the function I wrote.
If this is no longer the case, then guile has changed its interface again.
PLEASE DO NOT DO THAT.  If you think you made a mistake with the interface
I was told to use, please change the interface name and deprecate the
old one rather than cut me off at the knees.  Thank you.  Then I can
transition to another interface.  But please tell me which one.
I just want byte arrays.  I don't want Guile sticking its nose in and
"improving" the sequence of bytes for me (deleting DEL characters, for
example).

Thank you.  Regards, Bruce



reply via email to

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