mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
bpo-39573: Add Py_SET_TYPE() function (GH-18394)
Add Py_SET_TYPE() function to set the type of an object.
This commit is contained in:
parent
daa9756cb6
commit
d2ec81a8c9
24 changed files with 77 additions and 48 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue