[Python-Dev] warning in _localemodule.c patch

Martin von Loewis loewis@informatik.hu-berlin.de
Fri, 7 Sep 2001 22:31:13 +0200 (MEST)


> I'm not sure about the intersection of all the ifdefs.  Is it possible
> to execute the new code in the localmodule on Win32?  I was looking at
> the first value which is the literal "mbcs", which shouldn't be passed
> to free.

It's not possible, since there is no langinfo.h on Windows. Even if
that was (which may be the case for cygwin, dunno), it will only use
nl_langinfo(CODESET), strdup, and free, if it ever found Py_FSDE to be
NULL. If you through the code the first time and Py_FSDE is already
set, it won't attempt to change it, or free its current value.

Since the code appears not to be obvious, I think I shall put a
comment into it.

Regards,
Martin