[Python-checkins] r67703 - in python/branches/py3k: Misc/NEWS Modules/posixmodule.c
mark.dickinson
python-checkins at python.org
Thu Dec 11 19:03:04 CET 2008
Author: mark.dickinson
Date: Thu Dec 11 19:03:03 2008
New Revision: 67703
Log:
Issue #2173: fix build failure on OS X. device_encoding was returning an
empty string, causing an (invisible) LookupError on any attempt to write
to sys.stdout.
Modified:
python/branches/py3k/Misc/NEWS
python/branches/py3k/Modules/posixmodule.c
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Thu Dec 11 19:03:03 2008
@@ -12,6 +12,10 @@
Core and Builtins
-----------------
+- Issue #2173: When getting device encoding, check that return value of
+ nl_langinfo is not the empty string. This was causing silent build
+ failures on OS X.
+
- Issue #4597: Fixed several opcodes that weren't always propagating
exceptions.
Modified: python/branches/py3k/Modules/posixmodule.c
==============================================================================
--- python/branches/py3k/Modules/posixmodule.c (original)
+++ python/branches/py3k/Modules/posixmodule.c Thu Dec 11 19:03:03 2008
@@ -6724,7 +6724,7 @@
#elif defined(CODESET)
{
char *codeset = nl_langinfo(CODESET);
- if (codeset)
+ if (codeset != NULL && codeset[0] != 0)
return PyUnicode_FromString(codeset);
}
#endif
More information about the Python-checkins
mailing list