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 "pycapsule.h"
111
#include "traceback.h"
112
#include "sliceobject.h"
113
#include "cellobject.h"
114
#include "iterobject.h"
115
#include "genobject.h"
116
#include "descrobject.h"
117
#include "warnings.h"
118
#include "weakrefobject.h"
121
#include "pyerrors.h"
126
#include "modsupport.h"
127
#include "pythonrun.h"
129
#include "sysmodule.h"
130
#include "intrcheck.h"
133
#include "abstract.h"
139
#include "pystrtod.h"
140
#include "pystrcmp.h"
143
/* _Py_Mangle is defined in compile.c */
144
PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
146
/* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
147
#define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
149
/* PyArg_NoArgs should not be necessary.
150
Set ml_flags in the PyMethodDef to METH_NOARGS. */
151
#define PyArg_NoArgs(v) PyArg_Parse(v, "")
153
/* Argument must be a char or an int in [-128, 127] or [0, 255]. */
154
#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
158
/* These definitions must match corresponding definitions in graminit.h.
159
There's code in compile.c that checks that they are the same. */
160
#define Py_single_input 256
161
#define Py_file_input 257
162
#define Py_eval_input 258
165
/* GNU pth user-space thread support */
169
/* Define macros for inline documentation. */
170
#define PyDoc_VAR(name) static char name[]
171
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
172
#ifdef WITH_DOC_STRINGS
173
#define PyDoc_STR(str) str
175
#define PyDoc_STR(str) ""
178
#endif /* !Py_PYTHON_H */
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 "pycapsule.h"
111
#include "traceback.h"
112
#include "sliceobject.h"
113
#include "cellobject.h"
114
#include "iterobject.h"
115
#include "genobject.h"
116
#include "descrobject.h"
117
#include "warnings.h"
118
#include "weakrefobject.h"
121
#include "pyerrors.h"
126
#include "modsupport.h"
127
#include "pythonrun.h"
129
#include "sysmodule.h"
130
#include "intrcheck.h"
133
#include "abstract.h"
139
#include "pystrtod.h"
140
#include "pystrcmp.h"
143
/* _Py_Mangle is defined in compile.c */
144
PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
146
/* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
147
#define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
149
/* PyArg_NoArgs should not be necessary.
150
Set ml_flags in the PyMethodDef to METH_NOARGS. */
151
#define PyArg_NoArgs(v) PyArg_Parse(v, "")
153
/* Argument must be a char or an int in [-128, 127] or [0, 255]. */
154
#define Py_CHARMASK(c) ((unsigned char)((c) & 0xff))
158
/* These definitions must match corresponding definitions in graminit.h.
159
There's code in compile.c that checks that they are the same. */
160
#define Py_single_input 256
161
#define Py_file_input 257
162
#define Py_eval_input 258
165
/* GNU pth user-space thread support */
169
/* Define macros for inline documentation. */
170
#define PyDoc_VAR(name) static char name[]
171
#define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str)
172
#ifdef WITH_DOC_STRINGS
173
#define PyDoc_STR(str) str
175
#define PyDoc_STR(str) ""
178
#endif /* !Py_PYTHON_H */