[Python-checkins] cpython: Issue #21124: Fix building _struct on Cygwin.

zach.ware python-checkins at python.org
Sun Oct 2 01:34:09 EDT 2016


https://hg.python.org/cpython/rev/3bde312ae936
changeset: 104223:3bde312ae936
user: Zachary Ware <zachary.ware at gmail.com>
date: Sun Oct 02 00:33:39 2016 -0500
summary:
 Issue #21124: Fix building _struct on Cygwin.
Patch by Masayuki Yamamoto.
files:
 Misc/NEWS | 4 ++++
 Modules/_struct.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -175,6 +175,10 @@
 Build
 -----
 
+- Issue #21124: Fix building the _struct module on Cygwin by passing ``NULL``
+ instead of ``&PyType_Type`` to PyVarObject_HEAD_INIT. Patch by Masayuki
+ Yamamoto.
+
 - Issue #13756: Fix building extensions modules on Cygwin. Patch by Roumen
 Petrov, based on original patch by Jason Tishler.
 
diff --git a/Modules/_struct.c b/Modules/_struct.c
--- a/Modules/_struct.c
+++ b/Modules/_struct.c
@@ -1650,7 +1650,7 @@
 }
 
 static PyTypeObject unpackiter_type = {
- PyVarObject_HEAD_INIT(&PyType_Type, 0)
+ PyVarObject_HEAD_INIT(NULL, 0)
 "unpack_iterator", /* tp_name */
 sizeof(unpackiterobject), /* tp_basicsize */
 0, /* tp_itemsize */
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

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