1// Forward declarations of types of the Python C API.
2// Declare them at the same place since redefining typedef is a C11 feature.
3// Only use a forward declaration if there is an interdependency between two
4// header files.
5
6#ifndef Py_PYTYPEDEFS_H
7#define Py_PYTYPEDEFS_H
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12typedef struct PyModuleDef PyModuleDef;
13typedef struct PyModuleDef_Slot PyModuleDef_Slot;
14typedef struct PyMethodDef PyMethodDef;
15typedef struct PyGetSetDef PyGetSetDef;
16typedef struct PyMemberDef PyMemberDef;
17
18typedef struct _object PyObject;
19typedef struct _longobject PyLongObject;
20typedef struct _typeobject PyTypeObject;
21typedef struct PyCodeObject PyCodeObject;
22typedef struct _frame PyFrameObject;
23
24typedef struct _ts PyThreadState;
25typedef struct _is PyInterpreterState;
26
27#ifdef __cplusplus
28}
29#endif
30#endif // !Py_PYTYPEDEFS_H
31

source code of include/python3.12/pytypedefs.h