[Python-checkins] cpython (2.7): Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
ned.deily
python-checkins at python.org
Mon Aug 15 03:24:35 EDT 2016
https://hg.python.org/cpython/rev/e0ec3471cb09
changeset: 102665:e0ec3471cb09
branch: 2.7
parent: 102654:d568f66fa26c
user: Ned Deily <nad at python.org>
date: Mon Aug 15 02:59:31 2016 -0400
summary:
Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
Patch by Ronald Oussoren.
files:
Include/pyport.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Include/pyport.h b/Include/pyport.h
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -713,6 +713,12 @@
#endif
#ifdef _PY_PORT_CTYPE_UTF8_ISSUE
+#ifndef __cplusplus
+ /* The workaround below is unsafe in C++ because
+ * the <locale> defines these symbols as real functions,
+ * with a slightly different signature.
+ * See issue #10910
+ */
#include <ctype.h>
#include <wctype.h>
#undef isalnum
@@ -730,6 +736,7 @@
#undef toupper
#define toupper(c) towupper(btowc(c))
#endif
+#endif
/* Declarations for symbol visibility.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list