]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #21124: Fix building _struct on Cygwin.
authorZachary Ware <zachary.ware@gmail.com>
Sun, 2 Oct 2016 05:33:39 +0000 (00:33 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Sun, 2 Oct 2016 05:33:39 +0000 (00:33 -0500)
Patch by Masayuki Yamamoto.

Misc/NEWS
Modules/_struct.c

index 96a5c907fac3a584d0730c2be77218c58a1fddbb..b7fc2ae0c44318a8d92d0b4931a9a4ffefec8250 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -175,6 +175,10 @@ Windows
 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.
 
index 796d1682f094f1498bc3d18c5942d785294d22da..9d48691c8a96334efe20cb05eaba8d2c8524d980 100644 (file)
@@ -1650,7 +1650,7 @@ unpackiter_iternext(unpackiterobject *self)
 }
 
 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 */