mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-43908: Document Static Types in the C API (GH-25710)
Update also PyTypeObject structure definition in the doc.
This commit is contained in:
parent
c6ad03fddf
commit
5bd0619533
7 changed files with 75 additions and 50 deletions
|
@ -35,12 +35,14 @@ typedef struct _typeobject {
|
|||
|
||||
const char *tp_doc; /* Documentation string */
|
||||
|
||||
/* Assigned meaning in release 2.0 */
|
||||
/* call function for all accessible objects */
|
||||
traverseproc tp_traverse;
|
||||
|
||||
/* delete references to contained objects */
|
||||
inquiry tp_clear;
|
||||
|
||||
/* Assigned meaning in release 2.1 */
|
||||
/* rich comparisons */
|
||||
richcmpfunc tp_richcompare;
|
||||
|
||||
|
@ -55,6 +57,7 @@ typedef struct _typeobject {
|
|||
struct PyMethodDef *tp_methods;
|
||||
struct PyMemberDef *tp_members;
|
||||
struct PyGetSetDef *tp_getset;
|
||||
// Strong reference on a heap type, borrowed reference on a static type
|
||||
struct _typeobject *tp_base;
|
||||
PyObject *tp_dict;
|
||||
descrgetfunc tp_descr_get;
|
||||
|
@ -76,5 +79,5 @@ typedef struct _typeobject {
|
|||
unsigned int tp_version_tag;
|
||||
|
||||
destructor tp_finalize;
|
||||
|
||||
vectorcallfunc tp_vectorcall;
|
||||
} PyTypeObject;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue