From d2ec81a8c99796b51fb8c49b77a7fe369863226f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 7 Feb 2020 09:17:07 +0100 Subject: bpo-39573: Add Py_SET_TYPE() function (GH-18394) Add Py_SET_TYPE() function to set the type of an object. --- Modules/arraymodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/arraymodule.c') diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index edb56ab6e1..5065d28daf 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2996,7 +2996,7 @@ array_modexec(PyObject *m) if (PyType_Ready(&Arraytype) < 0) return -1; - Py_TYPE(&PyArrayIter_Type) = &PyType_Type; + Py_SET_TYPE(&PyArrayIter_Type, &PyType_Type); Py_INCREF((PyObject *)&Arraytype); if (PyModule_AddObject(m, "ArrayType", (PyObject *)&Arraytype) < 0) { -- cgit v1.2.1