summaryrefslogtreecommitdiff
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-02-07 09:17:07 +0100
committerGitHub <noreply@github.com>2020-02-07 09:17:07 +0100
commitd2ec81a8c99796b51fb8c49b77a7fe369863226f (patch)
treed88e7cbe89f65366d5591338fbe59a71192950db /Modules/arraymodule.c
parentdaa9756cb6395323d6f291efe5c7d7fdc6b2e9d8 (diff)
downloadcpython-git-d2ec81a8c99796b51fb8c49b77a7fe369863226f.tar.gz
bpo-39573: Add Py_SET_TYPE() function (GH-18394)
Add Py_SET_TYPE() function to set the type of an object.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c2
1 files changed, 1 insertions, 1 deletions
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) {