3 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
5 /* Include nearly all Python header files */
7 #include "patchlevel.h"
9 #include "pymacconfig.h"
11 /* Cyclic gc is always enabled, starting with release 2.3a1. Supply the
12 * old symbol for the benefit of extension modules written before then
13 * that may be conditionalizing on it. The core doesn't use it anymore.
16 #define WITH_CYCLE_GC 1
22 #error "Something's broken. UCHAR_MAX should be defined in limits.h."
26 #error "Python's source code assumes C's unsigned char is an 8-bit type."
29 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
30 #define _SGI_MP_SOURCE
35 # error "Python.h requires that stdio.h define NULL."
52 /* CAUTION: Build setups should ensure that NDEBUG is defined on the
53 * compiler command line when building Python in release mode; else
54 * assert() calls won't be removed.
60 /* pyconfig.h or pyport.h may or may not define DL_IMPORT */
61 #ifndef DL_IMPORT /* declarations for DLL import/export */
62 #define DL_IMPORT(RTYPE) RTYPE
64 #ifndef DL_EXPORT /* declarations for DLL import/export */
65 #define DL_EXPORT(RTYPE) RTYPE
68 /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
69 * PYMALLOC_DEBUG is in error if pymalloc is not in use.
71 #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
72 #define PYMALLOC_DEBUG
74 #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
75 #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
85 #include "unicodeobject.h"
86 #include "intobject.h"
87 #include "boolobject.h"
88 #include "longobject.h"
89 #include "floatobject.h"
90 #ifndef WITHOUT_COMPLEX
91 #include "complexobject.h"
93 #include "rangeobject.h"
94 #include "stringobject.h"
95 #include "memoryobject.h"
96 #include "bufferobject.h"
97 #include "bytesobject.h"
98 #include "bytearrayobject.h"
99 #include "tupleobject.h"
100 #include "listobject.h"
101 #include "dictobject.h"
102 #include "enumobject.h"
103 #include "setobject.h"
104 #include "methodobject.h"
105 #include "moduleobject.h"
106 #include "funcobject.h"
107 #include "classobject.h"
108 #include "fileobject.h"
110 #include "traceback.h"
111 #include "sliceobject.h"
112 #include "cellobject.h"
113 #include "iterobject.h"
114 #include "genobject.h"
115 #include "descrobject.h"
116 #include "warnings.h"
117 #include "weakrefobject.h"
120 #include "pyerrors.h"
125 #include "modsupport.h"
126 #include "pythonrun.h"
128 #include "sysmodule.h"
129 #include "intrcheck.h"
132 #include "abstract.h"
138 #include "pystrtod.h"
139 #include "pystrcmp.h"
141 /* _Py_Mangle is defined in compile.c */
142 PyAPI_FUNC(PyObject
*) _Py_Mangle(PyObject
*p
, PyObject
*name
);
144 /* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
145 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
147 /* PyArg_NoArgs should not be necessary.
148 Set ml_flags in the PyMethodDef to METH_NOARGS. */
149 #define PyArg_NoArgs(v) PyArg_Parse(v, "")
151 /* Convert a possibly signed character to a nonnegative int */
152 /* XXX This assumes characters are 8 bits wide */
153 #ifdef __CHAR_UNSIGNED__
154 #define Py_CHARMASK(c) (c)
156 #define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
161 /* These definitions must match corresponding definitions in graminit.h.
162 There's code in compile.c that checks that they are the same. */
163 #define Py_single_input 256
164 #define Py_file_input 257
165 #define Py_eval_input 258
168 /* GNU pth user-space thread support */
172 /* Define macros for inline documentation. */
173 #define PyDoc_VAR(name) static char name[]
174 #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
175 #ifdef WITH_DOC_STRINGS
176 #define PyDoc_STR(str) str
178 #define PyDoc_STR(str) ""
181 #endif /* !Py_PYTHON_H */