1d27b4f2a3f6a90dfcc5eb6fb30c1a895ed60142dGuido van Rossum#ifndef Py_PYTHON_H
2d27b4f2a3f6a90dfcc5eb6fb30c1a895ed60142dGuido van Rossum#define Py_PYTHON_H
3174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum/* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
4174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
5174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum/* Include nearly all Python header files */
6174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
7f1176c4815cd628ae443b5c4b0e1841588369776Guido van Rossum#include "patchlevel.h"
84f1cd8bdcbd20bb0acdbe9e240f28c09dd38370fMartin v. Löwis#include "pyconfig.h"
9fcaf910a1fe9739afcf3be41ac2db31e8286c40fGeorg Brandl#include "pymacconfig.h"
10174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
11d5fadf75e4d18df61db41205ace0cda28d98eeaaFred Drake#include <limits.h>
12d5fadf75e4d18df61db41205ace0cda28d98eeaaFred Drake
13ac4ea13a3aec87bf3e6ceb54e867e20f1fbd4253Skip Montanaro#ifndef UCHAR_MAX
14ac4ea13a3aec87bf3e6ceb54e867e20f1fbd4253Skip Montanaro#error "Something's broken.  UCHAR_MAX should be defined in limits.h."
15ac4ea13a3aec87bf3e6ceb54e867e20f1fbd4253Skip Montanaro#endif
16ac4ea13a3aec87bf3e6ceb54e867e20f1fbd4253Skip Montanaro
17ac4ea13a3aec87bf3e6ceb54e867e20f1fbd4253Skip Montanaro#if UCHAR_MAX != 255
180490fe96d882072aca640ef5c6f42ed80a789f0dTim Peters#error "Python's source code assumes C's unsigned char is an 8-bit type."
19ac4ea13a3aec87bf3e6ceb54e867e20f1fbd4253Skip Montanaro#endif
20ac4ea13a3aec87bf3e6ceb54e867e20f1fbd4253Skip Montanaro
2190ce8488481521e5ddd1fe5ed942e1df4acd6365Guido van Rossum#if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
2290ce8488481521e5ddd1fe5ed942e1df4acd6365Guido van Rossum#define _SGI_MP_SOURCE
2390ce8488481521e5ddd1fe5ed942e1df4acd6365Guido van Rossum#endif
2490ce8488481521e5ddd1fe5ed942e1df4acd6365Guido van Rossum
25174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include <stdio.h>
264826a894c5afa6f8b61d2b94c5a8b07588cb692aTim Peters#ifndef NULL
274826a894c5afa6f8b61d2b94c5a8b07588cb692aTim Peters#   error "Python.h requires that stdio.h define NULL."
284826a894c5afa6f8b61d2b94c5a8b07588cb692aTim Peters#endif
294826a894c5afa6f8b61d2b94c5a8b07588cb692aTim Peters
30174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include <string.h>
310e3f591aeeef9ed715f8770320f4c4c7332a8794Thomas Wouters#ifdef HAVE_ERRNO_H
32174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include <errno.h>
33477c8d5e70240744d24631b18341ad892c8a8e1cThomas Wouters#endif
34174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include <stdlib.h>
35cdc445122208cb90a59a468a7396b227e223c43aMartin v. Löwis#ifdef HAVE_UNISTD_H
36cdc445122208cb90a59a468a7396b227e223c43aMartin v. Löwis#include <unistd.h>
37cdc445122208cb90a59a468a7396b227e223c43aMartin v. Löwis#endif
38b2c075bec452f66155d447ed9a1ae1a6479502a8Guido van Rossum
39fdfe62d887d5b695a82dae68006ac3b12c02eb57Amaury Forgeot d'Arc/* For size_t? */
40fe393f47c662c307d2d3e90f785edf5821d54a8dMartin v. Löwis#ifdef HAVE_STDDEF_H
41fe393f47c662c307d2d3e90f785edf5821d54a8dMartin v. Löwis#include <stddef.h>
42fe393f47c662c307d2d3e90f785edf5821d54a8dMartin v. Löwis#endif
43fe393f47c662c307d2d3e90f785edf5821d54a8dMartin v. Löwis
445defb1736d36ea44bbb8f613cd0031d68816819bTim Peters/* CAUTION:  Build setups should ensure that NDEBUG is defined on the
455defb1736d36ea44bbb8f613cd0031d68816819bTim Peters * compiler command line when building Python in release mode; else
465defb1736d36ea44bbb8f613cd0031d68816819bTim Peters * assert() calls won't be removed.
475defb1736d36ea44bbb8f613cd0031d68816819bTim Peters */
488315ea579046727bb234dc4692ca28c8514eacbeTim Peters#include <assert.h>
498315ea579046727bb234dc4692ca28c8514eacbeTim Peters
501e1fcef756dbec60c9062462b46777ffc2a0594eMartin v. Löwis#include "pyport.h"
51dfb866d127c852dfd2d36dfb766d90a518aaf516Victor Stinner#include "pymacro.h"
521e1fcef756dbec60c9062462b46777ffc2a0594eMartin v. Löwis
5339370830a96068ecbad006fe38fdb13107d8cd6bJeffrey Yasskin#include "pyatomic.h"
5439370830a96068ecbad006fe38fdb13107d8cd6bJeffrey Yasskin
55ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
56ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters *  PYMALLOC_DEBUG is in error if pymalloc is not in use.
57ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters */
58ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters#if defined(Py_DEBUG) && defined(WITH_PYMALLOC) && !defined(PYMALLOC_DEBUG)
59ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters#define PYMALLOC_DEBUG
60ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters#endif
61ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters#if defined(PYMALLOC_DEBUG) && !defined(WITH_PYMALLOC)
62ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters#error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
63ddea208be9e2a8fa281e25ebbc890378dd2aa286Tim Peters#endif
6453876d9cd8a67d9e67772e082deab92a598f74b3Christian Heimes#include "pymath.h"
656fc4ade2bb44a176555703ebc2dbfb54b57e1148Alexander Belopolsky#include "pytime.h"
6625f68944c20a3a37da6776277057c2d19a80211fPeter Schneider-Kamp#include "pymem.h"
6725f68944c20a3a37da6776277057c2d19a80211fPeter Schneider-Kamp
68174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "object.h"
69174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "objimpl.h"
704d0d471a8031de90a2b1ce99c4ac4780e60b3bc9Martin v. Löwis#include "typeslots.h"
71985ecdcfc29adfc36ce2339acf03f819ad414869Christian Heimes#include "pyhash.h"
72174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
73174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "pydebug.h"
74174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
752c9c7a5f33d502fa468e38537d57834c7e33aa4dChristian Heimes#include "bytearrayobject.h"
764dfe8a1131b551687659b9339eaee163a24f82f1Guido van Rossum#include "bytesobject.h"
779e896b37c7a554250d7d832566cc4fe7d30d034cGuido van Rossum#include "unicodeobject.h"
78174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "longobject.h"
799f2e346911988cda95fec7c901e8d10d34fa9563Martin v. Löwis#include "longintrepr.h"
809f2e346911988cda95fec7c901e8d10d34fa9563Martin v. Löwis#include "boolobject.h"
81174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "floatobject.h"
82174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "complexobject.h"
83174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "rangeobject.h"
84b99f762f10edb2646a634c2290ecb064bd52e5c7Travis E. Oliphant#include "memoryobject.h"
85174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "tupleobject.h"
86174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "listobject.h"
872ec9031b5589db81026f5fc3a11070002ec4d0d7Guido van Rossum#include "dictobject.h"
8847db71756dc46873752166d35d4b8d00d09c8c5fEric Snow#include "odictobject.h"
897dab2426ca0bae36fde565407ddb4b2d2cbf2575Guido van Rossum#include "enumobject.h"
90a690a9967e715663b7a421c9ebdad91381cdf1e4Raymond Hettinger#include "setobject.h"
91174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "methodobject.h"
92174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "moduleobject.h"
93174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "funcobject.h"
94174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "classobject.h"
95174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "fileobject.h"
96b173f7853e4e3a4215a661d98174291e379cf6fbBenjamin Peterson#include "pycapsule.h"
97174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "traceback.h"
98174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "sliceobject.h"
99fbd849f201a4a8c17745a72eb9f0ee3bae34d330Jeremy Hylton#include "cellobject.h"
10059d1d2b434e8cf79e8b1321f148254c68f56c1f7Guido van Rossum#include "iterobject.h"
1018d97e33bb76c322cdb08dbf97c26d787cd3488a7Martin v. Löwis#include "genobject.h"
1026d6c1a35e08b95a83dbe47dbd9e6474daff00354Tim Peters#include "descrobject.h"
10333fe8093df5c13e41d7dba764279c71c142a4a7dChristian Heimes#include "warnings.h"
10419bc578a0907844cb94fe6f727fa5158736086faFred Drake#include "weakrefobject.h"
10571c23d447322307572fbe0ca68b61fad97e10021Georg Brandl#include "structseq.h"
106409da157d7ff2a49892e20a94a3fc83475845d22Barry Warsaw#include "namespaceobject.h"
1074d0d471a8031de90a2b1ce99c4ac4780e60b3bc9Martin v. Löwis
108bd7dfbc146deb31c520d886415ffd2d00f6970b0Guido van Rossum#include "codecs.h"
109174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "pyerrors.h"
110174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
111618af4b3ef08d5eee9c36fafd4cd57c54573f95eGuido van Rossum#include "pystate.h"
112618af4b3ef08d5eee9c36fafd4cd57c54573f95eGuido van Rossum
113adb69fcdffdc50ee3e1d33b00cd874020197b445Neal Norwitz#include "pyarena.h"
114174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "modsupport.h"
115174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "pythonrun.h"
116d600951748d7a19cdb3e58a376c51ed804b630e6Nick Coghlan#include "pylifecycle.h"
1175ba58662817b708a453020f0425fe4747ea6d5cbTim Peters#include "ceval.h"
118174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "sysmodule.h"
119410ef8e23088ab2b8bd92ac70a8176f71da2b931Ethan Furman#include "osmodule.h"
120174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "intrcheck.h"
121174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "import.h"
122174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
123174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "abstract.h"
1248bc5b681599b66887f69ca54631d6e1ce4894252Benjamin Peterson#include "bltinmodule.h"
125174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
1266e098a15a3493d9c136e18b9e51b67bd48545651Skip Montanaro#include "compile.h"
1276e098a15a3493d9c136e18b9e51b67bd48545651Skip Montanaro#include "eval.h"
1286e098a15a3493d9c136e18b9e51b67bd48545651Skip Montanaro
1296dc46f5eaa14c8aa33b8ae5b41642a00a1b25807Eric Smith#include "pyctype.h"
130737ea82a5abd448b3e214b44d7d3c579b77e8155Martin v. Löwis#include "pystrtod.h"
13199170a5dbf4cfee78b578672b6821e855f92594bChristian Heimes#include "pystrcmp.h"
132b08a53a99def3fa949643974f713b5b189e21bc7Mark Dickinson#include "dtoa.h"
1334e31443c4d2c1fb211a6ea90fc6a8fbd9ff81c97Victor Stinner#include "fileutils.h"
134174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum#include "pyfpe.h"
135174f95adf7ee1251738a291d0fb52760ea1b25c0Guido van Rossum
136d27b4f2a3f6a90dfcc5eb6fb30c1a895ed60142dGuido van Rossum#endif /* !Py_PYTHON_H */
137