Updated for 2.1a3
[python/dscho.git] / Include / Python.h
blobb771c8cf702ef2644061c01254f6c5bc0d3d5dbf
1 #ifndef Py_PYTHON_H
2 #define Py_PYTHON_H
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. */
8 #ifndef _GNU_SOURCE
9 # define _GNU_SOURCE 1
10 #endif
12 /* Forcing SUSv2 compatibility still produces problems on some
13 platforms, True64 and SGI IRIX begin two of them, so for now the
14 define is switched off. */
15 #if 0
16 #ifndef _XOPEN_SOURCE
17 # define _XOPEN_SOURCE 500
18 #endif
19 #endif
21 /* Include nearly all Python header files */
23 #include "patchlevel.h"
24 #include "config.h"
26 #ifdef HAVE_LIMITS_H
27 #include <limits.h>
28 #endif
30 /* config.h may or may not define DL_IMPORT */
31 #ifndef DL_IMPORT /* declarations for DLL import/export */
32 #define DL_IMPORT(RTYPE) RTYPE
33 #endif
34 #ifndef DL_EXPORT /* declarations for DLL import/export */
35 #define DL_EXPORT(RTYPE) RTYPE
36 #endif
38 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
39 #define _SGI_MP_SOURCE
40 #endif
42 #include <stdio.h>
43 #ifndef NULL
44 # error "Python.h requires that stdio.h define NULL."
45 #endif
47 #include <string.h>
48 #include <errno.h>
49 #ifdef HAVE_STDLIB_H
50 #include <stdlib.h>
51 #endif
52 #include <assert.h>
54 #include "pyport.h"
56 #include "pymem.h"
58 #include "object.h"
59 #include "objimpl.h"
61 #include "pydebug.h"
63 #include "unicodeobject.h"
64 #include "intobject.h"
65 #include "longobject.h"
66 #include "floatobject.h"
67 #ifndef WITHOUT_COMPLEX
68 #include "complexobject.h"
69 #endif
70 #include "rangeobject.h"
71 #include "stringobject.h"
72 #include "bufferobject.h"
73 #include "tupleobject.h"
74 #include "listobject.h"
75 #include "dictobject.h"
76 #include "methodobject.h"
77 #include "moduleobject.h"
78 #include "funcobject.h"
79 #include "classobject.h"
80 #include "fileobject.h"
81 #include "cobject.h"
82 #include "traceback.h"
83 #include "sliceobject.h"
84 #include "cellobject.h"
86 #include "codecs.h"
87 #include "pyerrors.h"
89 #include "pystate.h"
91 #include "modsupport.h"
92 #include "ceval.h"
93 #include "pythonrun.h"
94 #include "sysmodule.h"
95 #include "intrcheck.h"
96 #include "import.h"
98 #include "abstract.h"
100 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
101 #define PyArg_NoArgs(v) PyArg_Parse(v, "")
103 /* Convert a possibly signed character to a nonnegative int */
104 /* XXX This assumes characters are 8 bits wide */
105 #ifdef __CHAR_UNSIGNED__
106 #define Py_CHARMASK(c) (c)
107 #else
108 #define Py_CHARMASK(c) ((c) & 0xff)
109 #endif
111 #include "pyfpe.h"
113 /* These definitions must match corresponding definitions in graminit.h.
114 There's code in compile.c that checks that they are the same. */
115 #define Py_single_input 256
116 #define Py_file_input 257
117 #define Py_eval_input 258
119 #ifdef HAVE_PTH
120 /* GNU pth user-space thread support */
121 #include <pth.h>
122 #endif
123 #endif /* !Py_PYTHON_H */