[Python-checkins] cpython (2.7): Issue #20221: Removed conflicting (or circular) hypot definition

zach.ware python-checkins at python.org
Fri Oct 17 18:11:07 CEST 2014


https://hg.python.org/cpython/rev/430aaeaa8087
changeset: 93106:430aaeaa8087
branch: 2.7
user: Zachary Ware <zachary.ware at gmail.com>
date: Thu Feb 20 15:36:34 2014 -0600
summary:
 Issue #20221: Removed conflicting (or circular) hypot definition
when compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
files:
 Misc/NEWS | 3 +++
 PC/pyconfig.h | 4 ++++
 2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -263,6 +263,9 @@
 Build
 -----
 
+- Issue #20221: Removed conflicting (or circular) hypot definition when
+ compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
+
 - Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
 Jonathan Hosmer.
 
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -217,7 +217,11 @@
 #define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
 #define Py_IS_FINITE(X) _finite(X)
 #define copysign _copysign
+
+/* VS 2010 and above already defines hypot as _hypot */
+#if _MSC_VER < 1600
 #define hypot _hypot
+#endif
 
 #endif /* _MSC_VER */
 
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /