1
I’m analyzing the structure Pyobject of Cpython. The code for this structure follows below.
Structure PyObject
:
typedef struct _object {
_PyObject_HEAD_EXTRA
Py_ssize_t ob_refcnt;
struct _typeobject *ob_type;
} PyObject;
I have some doubts regarding the members of this structure, more specifically the member _PyObject_HEAD_EXTRA
that did not give to understand very well what is his purpose for the structure.
Doubts
- What is the structure for
PyObject
? - What is the purpose of each member of the structure
PyObject
?