On Tue, Feb 8, 2011 at 4:35 PM, Didier Verna <did...@lrde.epita.fr> wrote:

>
>  Hello,
>
> after a git upgrade today, I think there's a bug related to getenv in
> standalone executables. To reproduce, put this in test.lisp:


It depends on whether you call it a bug or a feature. Most POSIX functions
only accept base-strings. READ-LINE may return an ordinary Unicode string,
which is not compatible with the POSIX calls.

> (read-line)
PATH

"PATH"
NIL
> (type-of *)

(SIMPLE-ARRAY CHARACTER (4))
> (ext:getenv **)

Condition of type: SIMPLE-TYPE-ERROR
In function GETENV, the value of argument is
        "PATH"
which is not of expected type BASE-STRING

Nothing has changed in ECL, it is just that Unicode builds are now the
default and it triggered this unexpected condition. I just changed GETENV to
coerce its input to the appropriate type.

Juanjo

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to