[Python-checkins] r66892 - in python/branches/release26-maint: Include/unicodeobject.h Misc/NEWS Modules/_testcapimodule.c
amaury.forgeotdarc
python-checkins at python.org
Wed Oct 15 00:00:07 CEST 2008
Author: amaury.forgeotdarc
Date: Wed Oct 15 00:00:06 2008
New Revision: 66892
Log:
Merged revisions 66891 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r66891 | amaury.forgeotdarc | 2008-10-14 23:47:22 +0200 (mar., 14 oct. 2008) | 5 lines
#4122: On Windows, Py_UNICODE_ISSPACE cannot be used in an extension module:
compilation fails with "undefined reference to _Py_ascii_whitespace"
Will backport to 2.6.
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Include/unicodeobject.h
python/branches/release26-maint/Misc/NEWS
python/branches/release26-maint/Modules/_testcapimodule.c
Modified: python/branches/release26-maint/Include/unicodeobject.h
==============================================================================
--- python/branches/release26-maint/Include/unicodeobject.h (original)
+++ python/branches/release26-maint/Include/unicodeobject.h Wed Oct 15 00:00:06 2008
@@ -354,7 +354,7 @@
in most situations is solely ASCII whitespace, we optimize for the common
case by using a quick look-up table with an inlined check.
*/
-extern const unsigned char _Py_ascii_whitespace[];
+PyAPI_DATA(const unsigned char) _Py_ascii_whitespace[];
#define Py_UNICODE_ISSPACE(ch) \
((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))
Modified: python/branches/release26-maint/Misc/NEWS
==============================================================================
--- python/branches/release26-maint/Misc/NEWS (original)
+++ python/branches/release26-maint/Misc/NEWS Wed Oct 15 00:00:06 2008
@@ -37,6 +37,12 @@
- Issue #3758: Add ``patchcheck`` build target to .PHONY.
+C-API
+-----
+
+- Issue #4122: On Windows, fix a compilation error when using the
+ Py_UNICODE_ISSPACE macro in an extension module.
+
What's New in Python 2.6 final
==============================
Modified: python/branches/release26-maint/Modules/_testcapimodule.c
==============================================================================
--- python/branches/release26-maint/Modules/_testcapimodule.c (original)
+++ python/branches/release26-maint/Modules/_testcapimodule.c Wed Oct 15 00:00:06 2008
@@ -484,6 +484,10 @@
Py_UNICODE *value;
int len;
+ /* issue4122: Undefined reference to _Py_ascii_whitespace on Windows */
+ /* Just use the macro and check that it compiles */
+ int x = Py_UNICODE_ISSPACE(25);
+
tuple = PyTuple_New(1);
if (tuple == NULL)
return NULL;
More information about the Python-checkins
mailing list