Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
allendowney
GitHub Repository: allendowney/cpython
Path: blob/main/Include/Python.h
12 views
1
// Entry point of the Python C API.
2
// C extensions should only #include <Python.h>, and not include directly
3
// the other Python header files included by <Python.h>.
4
5
#ifndef Py_PYTHON_H
6
#define Py_PYTHON_H
7
8
// Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" {
9
10
// Include Python header files
11
#include "patchlevel.h"
12
#include "pyconfig.h"
13
#include "pymacconfig.h"
14
15
#if defined(__sgi) && !defined(_SGI_MP_SOURCE)
16
# define _SGI_MP_SOURCE
17
#endif
18
19
// stdlib.h, stdio.h, errno.h and string.h headers are not used by Python
20
// headers, but kept for backward compatibility. They are excluded from the
21
// limited C API of Python 3.11.
22
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 < 0x030b0000
23
# include <stdlib.h>
24
# include <stdio.h> // FILE*
25
# include <errno.h> // errno
26
# include <string.h> // memcpy()
27
#endif
28
#ifndef MS_WINDOWS
29
# include <unistd.h>
30
#endif
31
#ifdef HAVE_STDDEF_H
32
# include <stddef.h> // size_t
33
#endif
34
35
#include <assert.h> // assert()
36
#include <wchar.h> // wchar_t
37
38
#include "pyport.h"
39
#include "pymacro.h"
40
#include "pymath.h"
41
#include "pymem.h"
42
#include "pytypedefs.h"
43
#include "pybuffer.h"
44
#include "object.h"
45
#include "objimpl.h"
46
#include "typeslots.h"
47
#include "pyhash.h"
48
#include "cpython/pydebug.h"
49
#include "bytearrayobject.h"
50
#include "bytesobject.h"
51
#include "unicodeobject.h"
52
#include "longobject.h"
53
#include "cpython/longintrepr.h"
54
#include "boolobject.h"
55
#include "floatobject.h"
56
#include "complexobject.h"
57
#include "rangeobject.h"
58
#include "memoryobject.h"
59
#include "tupleobject.h"
60
#include "listobject.h"
61
#include "dictobject.h"
62
#include "cpython/odictobject.h"
63
#include "enumobject.h"
64
#include "setobject.h"
65
#include "methodobject.h"
66
#include "moduleobject.h"
67
#include "cpython/funcobject.h"
68
#include "cpython/classobject.h"
69
#include "fileobject.h"
70
#include "pycapsule.h"
71
#include "cpython/code.h"
72
#include "pyframe.h"
73
#include "traceback.h"
74
#include "sliceobject.h"
75
#include "cpython/cellobject.h"
76
#include "iterobject.h"
77
#include "cpython/initconfig.h"
78
#include "pystate.h"
79
#include "cpython/genobject.h"
80
#include "descrobject.h"
81
#include "genericaliasobject.h"
82
#include "warnings.h"
83
#include "weakrefobject.h"
84
#include "structseq.h"
85
#include "cpython/picklebufobject.h"
86
#include "codecs.h"
87
#include "pyerrors.h"
88
#include "pythread.h"
89
#include "cpython/context.h"
90
#include "modsupport.h"
91
#include "compile.h"
92
#include "pythonrun.h"
93
#include "pylifecycle.h"
94
#include "ceval.h"
95
#include "sysmodule.h"
96
#include "osmodule.h"
97
#include "intrcheck.h"
98
#include "import.h"
99
#include "abstract.h"
100
#include "bltinmodule.h"
101
#include "cpython/pyctype.h"
102
#include "pystrtod.h"
103
#include "pystrcmp.h"
104
#include "fileutils.h"
105
#include "cpython/pyfpe.h"
106
#include "cpython/tracemalloc.h"
107
#include "cpython/optimizer.h"
108
109
#endif /* !Py_PYTHON_H */
110
111