Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3938fd

Browse files
author
Skip Montanaro
committed
need to initialize ob_type slot at run-time, at least on cygwin
1 parent 29f5933 commit f3938fd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/itertoolsmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ teedataobject_dealloc(teedataobject *tdo)
413413
PyDoc_STRVAR(teedataobject_doc, "Data container common to multiple tee objects.");
414414

415415
static PyTypeObject teedataobject_type = {
416-
PyObject_HEAD_INIT(&PyType_Type)
416+
PyObject_HEAD_INIT(0) /* Must fill in type value later */
417417
0, /* ob_size */
418418
"itertools.tee_dataobject", /* tp_name */
419419
sizeof(teedataobject), /* tp_basicsize */
@@ -2465,6 +2465,7 @@ inititertools(void)
24652465
NULL
24662466
};
24672467

2468+
teedataobject_type.ob_type = &PyType_Type;
24682469
m = Py_InitModule3("itertools", module_methods, module_doc);
24692470

24702471
for (i=0 ; typelist[i] != NULL ; i++) {

0 commit comments

Comments
 (0)