3 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
6 /* Enable compiler features; switching on C lib defines doesn't work
7 here, because the symbols haven't necessarily been defined yet. */
12 /* Forcing SUSv2 compatibility still produces problems on some
13 platforms, True64 and SGI IRIX being two of them, so for now the
14 define is switched off. */
17 # define _XOPEN_SOURCE 500
21 /* Include nearly all Python header files */
23 #include "patchlevel.h"
30 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
31 #define _SGI_MP_SOURCE
36 # error "Python.h requires that stdio.h define NULL."
48 /* CAUTION: Build setups should ensure that NDEBUG is defined on the
49 * compiler command line when building Python in release mode; else
50 * assert() calls won't be removed.
56 /* pyconfig.h or pyport.h may or may not define DL_IMPORT */
57 #ifndef DL_IMPORT /* declarations for DLL import/export */
58 #define DL_IMPORT(RTYPE) RTYPE
60 #ifndef DL_EXPORT /* declarations for DLL import/export */
61 #define DL_EXPORT(RTYPE) RTYPE
64 /* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
65 * PYMALLOC_DEBUG is in error if pymalloc is not in use.
67 #if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
68 #define PYMALLOC_DEBUG
70 #if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
71 #error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
80 #include "unicodeobject.h"
81 #include "intobject.h"
82 #include "boolobject.h"
83 #include "longobject.h"
84 #include "floatobject.h"
85 #ifndef WITHOUT_COMPLEX
86 #include "complexobject.h"
88 #include "rangeobject.h"
89 #include "stringobject.h"
90 #include "bufferobject.h"
91 #include "tupleobject.h"
92 #include "listobject.h"
93 #include "dictobject.h"
94 #include "enumobject.h"
95 #include "methodobject.h"
96 #include "moduleobject.h"
97 #include "funcobject.h"
98 #include "classobject.h"
99 #include "fileobject.h"
101 #include "traceback.h"
102 #include "sliceobject.h"
103 #include "cellobject.h"
104 #include "iterobject.h"
105 #include "descrobject.h"
106 #include "weakrefobject.h"
109 #include "pyerrors.h"
113 #include "modsupport.h"
114 #include "pythonrun.h"
116 #include "sysmodule.h"
117 #include "intrcheck.h"
120 #include "abstract.h"
122 /* _Py_Mangle is defined in compile.c */
123 extern DL_IMPORT(int) _Py_Mangle(char *p
, char *name
, \
124 char *buffer
, size_t maxlen
);
126 /* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
127 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
129 /* PyArg_NoArgs should not be necessary.
130 Set ml_flags in the PyMethodDef to METH_NOARGS. */
131 #define PyArg_NoArgs(v) PyArg_Parse(v, "")
133 /* Convert a possibly signed character to a nonnegative int */
134 /* XXX This assumes characters are 8 bits wide */
135 #ifdef __CHAR_UNSIGNED__
136 #define Py_CHARMASK(c) (c)
138 #define Py_CHARMASK(c) ((c) & 0xff)
143 /* These definitions must match corresponding definitions in graminit.h.
144 There's code in compile.c that checks that they are the same. */
145 #define Py_single_input 256
146 #define Py_file_input 257
147 #define Py_eval_input 258
150 /* GNU pth user-space thread support */
154 /* Define macros for inline documentation. */
155 #define PyDoc_VAR(name) static char name[]
156 #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
157 #ifdef WITH_DOC_STRINGS
158 #define PyDoc_STR(str) str
160 #define PyDoc_STR(str) ""
163 #endif /* !Py_PYTHON_H */