mirror of
https://github.com/python/cpython.git
synced 2025-07-25 12:14:38 +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
|
@ -70,6 +70,13 @@ the definition of all other Python objects.
|
|||
(((PyObject*)(o))->ob_type)
|
||||
|
||||
|
||||
.. c:function:: void Py_SET_TYPE(PyObject *o, PyTypeObject *type)
|
||||
|
||||
Set the object *o* type to *type*.
|
||||
|
||||
.. versionadded:: 3.9
|
||||
|
||||
|
||||
.. c:macro:: Py_REFCNT(o)
|
||||
|
||||
This macro is used to access the :attr:`ob_refcnt` member of a Python
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue