[Cs-dev] strtod() issue
Date | 2008-03-22 17:51 |
From | victor |
Subject | [Cs-dev] strtod() issue |
Attachments | None None |
It has come to my attention that Csound has a
potentially
problematic issue with orc/score parsing related to
the use of strtod(). I'll summarise the best I
can:
1. This issue has popped up when using the
Python
wrappers and the GTK library (PyGTK) on Linux
in
the XO computer
2. The importing of the GTK module seems to change
the
default locale.
3. strtod() in otran.c line 883 fails to translate
real numeric
constants and the "numeric syntax" message is
issued.
Compilation fails.
4. Other calls to strtod() in libcsound might also
fail. I came
across one such failure in linevent.c line
301.
5. The interim solution has been to
call
locale.setlocale(LC_ALL, "C") to set the locale
back to "C"
before compilation (this is a wrapper to the c
function
setlocale()).
The question is: should we fix this inside the
Csound library?
How should we be dealing with this
issue?
Victor |