]> granicus.if.org Git - python/commitdiff
Patch #676837: Cygwin array module patch
authorJason Tishler <jason@tishler.net>
Mon, 10 Feb 2003 20:45:47 +0000 (20:45 +0000)
committerJason Tishler <jason@tishler.net>
Mon, 10 Feb 2003 20:45:47 +0000 (20:45 +0000)
The attached patch enables the array module
to build cleanly under Cygwin again.

Modules/arraymodule.c

index e048d995a394b7331b3415330b281d2e61181703..74934bc75f55c090cde2c270fe7eea85b84751ca 100644 (file)
@@ -1949,7 +1949,7 @@ arrayiter_traverse(arrayiterobject *it, visitproc visit, void *arg)
 }
 
 static PyTypeObject PyArrayIter_Type = {
-       PyObject_HEAD_INIT(&PyType_Type)
+       PyObject_HEAD_INIT(NULL)
        0,                                      /* ob_size */
        "arrayiterator",                        /* tp_name */
        sizeof(arrayiterobject),                /* tp_basicsize */
@@ -1996,6 +1996,7 @@ initarray(void)
        PyObject *m;
 
        Arraytype.ob_type = &PyType_Type;
+       PyArrayIter_Type.ob_type = &PyType_Type;
        m = Py_InitModule3("array", a_methods, module_doc);
 
         Py_INCREF((PyObject *)&Arraytype);