You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. c:function:: PyObject*PyObject_Init(PyObject*op, PyTypeObject*type)
Initializeanewly-allocatedobject*op*withitstypeandinitialreference. Returnstheinitializedobject. If*type*indicatesthattheobjectparticipatesinthecyclicgarbagedetector, itisaddedtothedetector's set of observed objects. Other fields of the object are not
affected.
.. c:function:: TYPE*PyObject_New(TYPE, PyTypeObject*type)
AllocateanewPythonobjectusingtheCstructuretype*TYPE*andthePythontypeobject*type*. FieldsnotdefinedbythePythonobjectheaderarenotinitialized; theobject's reference count will be one. The size of
thememoryallocationisdeterminedfromthe :c:member:`~PyTypeObject.tp_basicsize` fieldofthetypeobject.
.. c:function:: voidPyObject_Del(void*op)
Releasesmemoryallocatedtoanobjectusing :c:func:`PyObject_New` or
:c:func:`PyObject_NewVar`. Thisisnormallycalledfromthe
:c:member:`~PyTypeObject.tp_dealloc` handlerspecifiedintheobject's type. The fields of
theobjectshouldnotbeaccessedafterthiscallasthememoryisnolongeravalidPythonobject.