Find the definition of an integer in Intobject.h
The data for the Python integer object is actually saved in Ob_ival, which is a long type in C. Pyobject_head should be a description of the integer object. Know from the source description that Pyobject_head defines initialization information for an integer object
where typedef struct _TYPEOBJECT{}PYTYPEOBJECT,PYTYPEOBJECT can be thought of as the most common, most primitive class of objects, used by other integers, strings, and other objects to inherit.
Pyapi_data (Pytypeobject) Pyint_type;, you can guess, Pyapi_data is a wrapper declaration that inherits pytypeobject from an integer object type. The assignment of Pyint_type can be found in intobject.c
You can see that Pyint_type's parent class initialization is done through Pytype_type.
Int_as_number is a collection of operations for integer objects, and this is no longer a closer look. It's worth noting that Int_doc, this is the document information for an integer object
Source code Analysis for Python int