3 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
5 /* Include nearly all Python header files */
7 #include "patchlevel.h"
10 /* Cyclic gc is always enabled, starting with release 2.3a1. Supply the
11 * old symbol for the benefit of extension modules written before then
12 * that may be conditionalizing on it. The core doesn't use it anymore.
15 #define WITH_CYCLE_GC 1
21 #error "Something's broken. UCHAR_MAX should be defined in limits.h."
25 #error "Python's source code assumes C's unsigned char is an 8-bit type."
28 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
29 #define _SGI_MP_SOURCE
34 # error "Python.h requires that stdio.h define NULL."
44 /* For uintptr_t, intptr_t */
49 /* CAUTION: Build setups should ensure that NDEBUG is defined on the
50 * compiler command line when building Python in release mode; else
51 * assert() calls won't be removed.
57 /* pyconfig.h or pyport.h may or may not define DL_IMPORT */
58 #ifndef DL_IMPORT /* declarations for DLL import/export */
59 #define DL_IMPORT(RTYPE) RTYPE
61 #ifndef DL_EXPORT /* declarations for DLL import/export */
62 #define DL_EXPORT(RTYPE) RTYPE
65 /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
66 * PYMALLOC_DEBUG is in error if pymalloc is not in use.
68 #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
69 #define PYMALLOC_DEBUG
71 #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
72 #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
81 #include "unicodeobject.h"
82 #include "intobject.h"
83 #include "boolobject.h"
84 #include "longobject.h"
85 #include "floatobject.h"
86 #ifndef WITHOUT_COMPLEX
87 #include "complexobject.h"
89 #include "rangeobject.h"
90 #include "stringobject.h"
91 #include "bufferobject.h"
92 #include "tupleobject.h"
93 #include "listobject.h"
94 #include "dictobject.h"
95 #include "enumobject.h"
96 #include "setobject.h"
97 #include "methodobject.h"
98 #include "moduleobject.h"
99 #include "funcobject.h"
100 #include "classobject.h"
101 #include "fileobject.h"
103 #include "traceback.h"
104 #include "sliceobject.h"
105 #include "cellobject.h"
106 #include "iterobject.h"
107 #include "genobject.h"
108 #include "descrobject.h"
109 #include "weakrefobject.h"
112 #include "pyerrors.h"
117 #include "modsupport.h"
118 #include "pythonrun.h"
120 #include "sysmodule.h"
121 #include "intrcheck.h"
124 #include "abstract.h"
129 #include "pystrtod.h"
131 /* _Py_Mangle is defined in compile.c */
132 PyAPI_FUNC(PyObject
*) _Py_Mangle(PyObject
*p
, PyObject
*name
);
134 /* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
135 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
137 /* PyArg_NoArgs should not be necessary.
138 Set ml_flags in the PyMethodDef to METH_NOARGS. */
139 #define PyArg_NoArgs(v) PyArg_Parse(v, "")
141 /* Convert a possibly signed character to a nonnegative int */
142 /* XXX This assumes characters are 8 bits wide */
143 #ifdef __CHAR_UNSIGNED__
144 #define Py_CHARMASK(c) (c)
146 #define Py_CHARMASK(c) ((c) & 0xff)
151 /* These definitions must match corresponding definitions in graminit.h.
152 There's code in compile.c that checks that they are the same. */
153 #define Py_single_input 256
154 #define Py_file_input 257
155 #define Py_eval_input 258
158 /* GNU pth user-space thread support */
162 /* Define macros for inline documentation. */
163 #define PyDoc_VAR(name) static char name[]
164 #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
165 #ifdef WITH_DOC_STRINGS
166 #define PyDoc_STR(str) str
168 #define PyDoc_STR(str) ""
171 #endif /* !Py_PYTHON_H */