From: Zachary Ware Date: Sun, 2 Oct 2016 05:33:39 +0000 (-0500) Subject: Issue #21124: Fix building _struct on Cygwin. X-Git-Tag: v3.7.0a1~2331 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=854adb1e0175dc915f5b611a2c780df6213d7c4b;p=thirdparty%2FPython%2Fcpython.git Issue #21124: Fix building _struct on Cygwin. Patch by Masayuki Yamamoto. --- diff --git a/Misc/NEWS b/Misc/NEWS index 96a5c907fac3..b7fc2ae0c443 100644 --- 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. diff --git a/Modules/_struct.c b/Modules/_struct.c index 796d1682f094..9d48691c8a96 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -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 */