Python.h 2.92 KB
Newer Older
1 2
#ifndef Py_PYTHON_H
#define Py_PYTHON_H
3 4 5 6
/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */

/* Include nearly all Python header files */

7
#include "patchlevel.h"
8
#include "pyconfig.h"
9
#include "pymacconfig.h"
10

11 12
#include <limits.h>

13 14 15 16 17
#ifndef UCHAR_MAX
#error "Something's broken.  UCHAR_MAX should be defined in limits.h."
#endif

#if UCHAR_MAX != 255
18
#error "Python's source code assumes C's unsigned char is an 8-bit type."
19 20
#endif

21
#if defined(__sgi) && !defined(_SGI_MP_SOURCE)
22 23 24
#define _SGI_MP_SOURCE
#endif

25
#include <stdio.h>
26 27 28 29
#ifndef NULL
#   error "Python.h requires that stdio.h define NULL."
#endif

30
#include <string.h>
31
#ifdef HAVE_ERRNO_H
32
#include <errno.h>
33
#endif
34
#include <stdlib.h>
35
#ifndef MS_WINDOWS
36 37
#include <unistd.h>
#endif
38 39 40
#ifdef HAVE_CRYPT_H
#include <crypt.h>
#endif
41

42
/* For size_t? */
43 44 45 46
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

47 48 49 50
/* CAUTION:  Build setups should ensure that NDEBUG is defined on the
 * compiler command line when building Python in release mode; else
 * assert() calls won't be removed.
 */
51 52
#include <assert.h>

Martin v. Löwis's avatar
Martin v. Löwis committed
53
#include "pyport.h"
54
#include "pymacro.h"
Martin v. Löwis's avatar
Martin v. Löwis committed
55

56 57
#include "pyatomic.h"

58 59 60 61 62 63 64 65 66
/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
 *  PYMALLOC_DEBUG is in error if pymalloc is not in use.
 */
#if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
#define PYMALLOC_DEBUG
#endif
#if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
#error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
#endif
67
#include "pymath.h"
68
#include "pytime.h"
69 70
#include "pymem.h"

71 72
#include "object.h"
#include "objimpl.h"
73
#include "typeslots.h"
74
#include "pyhash.h"
75 76 77

#include "pydebug.h"

78
#include "bytearrayobject.h"
79
#include "bytesobject.h"
80
#include "unicodeobject.h"
81
#include "longobject.h"
82 83
#include "longintrepr.h"
#include "boolobject.h"
84 85 86
#include "floatobject.h"
#include "complexobject.h"
#include "rangeobject.h"
87
#include "memoryobject.h"
88 89
#include "tupleobject.h"
#include "listobject.h"
90
#include "dictobject.h"
91
#include "odictobject.h"
92
#include "enumobject.h"
93
#include "setobject.h"
94 95 96 97 98
#include "methodobject.h"
#include "moduleobject.h"
#include "funcobject.h"
#include "classobject.h"
#include "fileobject.h"
99
#include "pycapsule.h"
100 101
#include "traceback.h"
#include "sliceobject.h"
Jeremy Hylton's avatar
Jeremy Hylton committed
102
#include "cellobject.h"
103
#include "iterobject.h"
104
#include "genobject.h"
105
#include "descrobject.h"
Christian Heimes's avatar
Christian Heimes committed
106
#include "warnings.h"
107
#include "weakrefobject.h"
108
#include "structseq.h"
109
#include "namespaceobject.h"
110

111
#include "codecs.h"
112 113
#include "pyerrors.h"

114
#include "coreconfig.h"
115
#include "pystate.h"
116
#include "context.h"
117

118
#include "pyarena.h"
119
#include "modsupport.h"
120
#include "compile.h"
121
#include "pythonrun.h"
122
#include "pylifecycle.h"
123
#include "ceval.h"
124
#include "sysmodule.h"
125
#include "osmodule.h"
126 127 128 129
#include "intrcheck.h"
#include "import.h"

#include "abstract.h"
130
#include "bltinmodule.h"
131

132 133
#include "eval.h"

134
#include "pyctype.h"
135
#include "pystrtod.h"
136
#include "pystrcmp.h"
137
#include "dtoa.h"
Victor Stinner's avatar
Victor Stinner committed
138
#include "fileutils.h"
139 140
#include "pyfpe.h"

141
#endif /* !Py_PYTHON_H */