mirror of
https://github.com/python/cpython.git
synced 2025-07-13 06:15:17 +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
|
@ -221,7 +221,7 @@ float_dealloc(PyFloatObject *op)
|
|||
return;
|
||||
}
|
||||
numfree++;
|
||||
Py_TYPE(op) = (struct _typeobject *)free_list;
|
||||
Py_SET_TYPE(op, (PyTypeObject *)free_list);
|
||||
free_list = op;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue