1 #ifndef Py_PYTHON_H
2 #define Py_PYTHON_H
3 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
4 
5 /* Include nearly all Python header files */
6 
7 #include "patchlevel.h"
8 #include "pyconfig.h"
9 #include "pymacconfig.h"
10 
11 #include <limits.h>
12 
13 #ifndef UCHAR_MAX
14 #error "Something's broken.  UCHAR_MAX should be defined in limits.h."
15 #endif
16 
17 #if UCHAR_MAX != 255
18 #error "Python's source code assumes C's unsigned char is an 8-bit type."
19 #endif
20 
21 #if defined(__sgi) && !defined(_SGI_MP_SOURCE)
22 #define _SGI_MP_SOURCE
23 #endif
24 
25 #include <stdio.h>
26 #ifndef NULL
27 #   error "Python.h requires that stdio.h define NULL."
28 #endif
29 
30 #include <string.h>
31 #ifdef HAVE_ERRNO_H
32 #include <errno.h>
33 #endif
34 #include <stdlib.h>
35 #ifndef MS_WINDOWS
36 #include <unistd.h>
37 #endif
38 
39 /* For size_t? */
40 #ifdef HAVE_STDDEF_H
41 #include <stddef.h>
42 #endif
43 
44 /* CAUTION:  Build setups should ensure that NDEBUG is defined on the
45  * compiler command line when building Python in release mode; else
46  * assert() calls won't be removed.
47  */
48 #include <assert.h>
49 
50 #include "pyport.h"
51 #include "pymacro.h"
52 
53 /* A convenient way for code to know if clang's memory sanitizer is enabled. */
54 #if defined(__has_feature)
55 #  if __has_feature(memory_sanitizer)
56 #    if !defined(_Py_MEMORY_SANITIZER)
57 #      define _Py_MEMORY_SANITIZER
58 #    endif
59 #  endif
60 #endif
61 
62 /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
63  *  PYMALLOC_DEBUG is in error if pymalloc is not in use.
64  */
65 #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
66 #define PYMALLOC_DEBUG
67 #endif
68 #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
69 #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
70 #endif
71 #include "pymath.h"
72 #include "pytime.h"
73 #include "pymem.h"
74 
75 #include "object.h"
76 #include "objimpl.h"
77 #include "typeslots.h"
78 #include "pyhash.h"
79 
80 #include "pydebug.h"
81 
82 #include "bytearrayobject.h"
83 #include "bytesobject.h"
84 #include "unicodeobject.h"
85 #include "longobject.h"
86 #include "longintrepr.h"
87 #include "boolobject.h"
88 #include "floatobject.h"
89 #include "complexobject.h"
90 #include "rangeobject.h"
91 #include "memoryobject.h"
92 #include "tupleobject.h"
93 #include "listobject.h"
94 #include "dictobject.h"
95 #include "odictobject.h"
96 #include "enumobject.h"
97 #include "setobject.h"
98 #include "methodobject.h"
99 #include "moduleobject.h"
100 #include "funcobject.h"
101 #include "classobject.h"
102 #include "fileobject.h"
103 #include "pycapsule.h"
104 #include "traceback.h"
105 #include "sliceobject.h"
106 #include "cellobject.h"
107 #include "iterobject.h"
108 #include "genobject.h"
109 #include "descrobject.h"
110 #include "warnings.h"
111 #include "weakrefobject.h"
112 #include "structseq.h"
113 #include "namespaceobject.h"
114 #include "picklebufobject.h"
115 
116 #include "codecs.h"
117 #include "pyerrors.h"
118 
119 #include "cpython/initconfig.h"
120 #include "pystate.h"
121 #include "context.h"
122 
123 #include "pyarena.h"
124 #include "modsupport.h"
125 #include "compile.h"
126 #include "pythonrun.h"
127 #include "pylifecycle.h"
128 #include "ceval.h"
129 #include "sysmodule.h"
130 #include "osmodule.h"
131 #include "intrcheck.h"
132 #include "import.h"
133 
134 #include "abstract.h"
135 #include "bltinmodule.h"
136 
137 #include "eval.h"
138 
139 #include "pyctype.h"
140 #include "pystrtod.h"
141 #include "pystrcmp.h"
142 #include "dtoa.h"
143 #include "fileutils.h"
144 #include "pyfpe.h"
145 #include "tracemalloc.h"
146 
147 #endif /* !Py_PYTHON_H */
148