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 "limits.h is required by std C -- why isn't HAVE_LIMITS_H defined?"
24 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
25 #define _SGI_MP_SOURCE
30 # error "Python.h requires that stdio.h define NULL."
42 /* CAUTION: Build setups should ensure that NDEBUG is defined on the
43 * compiler command line when building Python in release mode; else
44 * assert() calls won't be removed.
50 /* pyconfig.h or pyport.h may or may not define DL_IMPORT */
51 #ifndef DL_IMPORT /* declarations for DLL import/export */
52 #define DL_IMPORT(RTYPE) RTYPE
54 #ifndef DL_EXPORT /* declarations for DLL import/export */
55 #define DL_EXPORT(RTYPE) RTYPE
58 /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
59 * PYMALLOC_DEBUG is in error if pymalloc is not in use.
61 #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
62 #define PYMALLOC_DEBUG
64 #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
65 #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
74 #include "unicodeobject.h"
75 #include "intobject.h"
76 #include "boolobject.h"
77 #include "longobject.h"
78 #include "floatobject.h"
79 #ifndef WITHOUT_COMPLEX
80 #include "complexobject.h"
82 #include "rangeobject.h"
83 #include "stringobject.h"
84 #include "bufferobject.h"
85 #include "tupleobject.h"
86 #include "listobject.h"
87 #include "dictobject.h"
88 #include "enumobject.h"
89 #include "methodobject.h"
90 #include "moduleobject.h"
91 #include "funcobject.h"
92 #include "classobject.h"
93 #include "fileobject.h"
95 #include "traceback.h"
96 #include "sliceobject.h"
97 #include "cellobject.h"
98 #include "iterobject.h"
99 #include "descrobject.h"
100 #include "weakrefobject.h"
103 #include "pyerrors.h"
107 #include "modsupport.h"
108 #include "pythonrun.h"
110 #include "sysmodule.h"
111 #include "intrcheck.h"
114 #include "abstract.h"
116 /* _Py_Mangle is defined in compile.c */
117 PyAPI_FUNC(int) _Py_Mangle(char *p
, char *name
, \
118 char *buffer
, size_t maxlen
);
120 /* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
121 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
123 /* PyArg_NoArgs should not be necessary.
124 Set ml_flags in the PyMethodDef to METH_NOARGS. */
125 #define PyArg_NoArgs(v) PyArg_Parse(v, "")
127 /* Convert a possibly signed character to a nonnegative int */
128 /* XXX This assumes characters are 8 bits wide */
129 #ifdef __CHAR_UNSIGNED__
130 #define Py_CHARMASK(c) (c)
132 #define Py_CHARMASK(c) ((c) & 0xff)
137 /* These definitions must match corresponding definitions in graminit.h.
138 There's code in compile.c that checks that they are the same. */
139 #define Py_single_input 256
140 #define Py_file_input 257
141 #define Py_eval_input 258
144 /* GNU pth user-space thread support */
148 /* Define macros for inline documentation. */
149 #define PyDoc_VAR(name) static char name[]
150 #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
151 #ifdef WITH_DOC_STRINGS
152 #define PyDoc_STR(str) str
154 #define PyDoc_STR(str) ""
157 #endif /* !Py_PYTHON_H */