Skip to content

Commit e592491

Browse files
committed
Fix test on Windows
1 parent 9b5df8b commit e592491

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Modules/_testcapi/heaptype.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ pytype_getmodulebytoken(PyObject *self, PyObject *args)
544544
}
545545

546546
static PyType_Slot HeapCTypeWithBasesSlotInvalid_slots[] = {
547-
{Py_tp_bases, Py_None}, /* Not a tuple - should raise SystemError */
547+
{Py_tp_bases, NULL}, /* filled out with Py_None in runtime */
548548
{0, 0},
549549
};
550550

@@ -558,6 +558,7 @@ static PyType_Spec HeapCTypeWithBasesSlotInvalid_spec = {
558558
static PyObject *
559559
create_heapctype_with_invalid_bases_slot(PyObject *self, PyObject *Py_UNUSED(ignored))
560560
{
561+
HeapCTypeWithBasesSlotInvalid_slots[0].pfunc = Py_None;
561562
return PyType_FromSpec(&HeapCTypeWithBasesSlotInvalid_spec);
562563
}
563564

0 commit comments

Comments
 (0)