PyObject

Nothing is actually declared to be a PyObject, but every pointer to a Python object can be cast to a PyObject*. This is inheritance built by hand. Similarly every pointer to a variable-size Python object can, in addition, be cast to PyVarObject*.

extern (C)
struct PyObject {
Py_ssize_t ob_refcnt;
PyTypeObject* ob_type;
}

Meta