Bump version to 0.9.1.
[python/dscho.git] / Include / Python.h
blobb994401a52f99483119706e2145c0c1caa90f0ea
1 #ifndef Py_PYTHON_H
2 #define Py_PYTHON_H
3 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
5 /***********************************************************
6 Copyright (c) 2000, BeOpen.com.
7 Copyright (c) 1995-2000, Corporation for National Research Initiatives.
8 Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
9 All rights reserved.
11 See the file "Misc/COPYRIGHT" for information on usage and
12 redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 ******************************************************************/
15 /* Enable compiler features; switching on C lib defines doesn't work
16 here, because the symbols haven't necessarily been defined yet. */
17 #ifndef _GNU_SOURCE
18 # define _GNU_SOURCE 1
19 #endif
21 /* Forcing SUSv2 compatibility still produces problems on some
22 platforms, True64 and SGI IRIX begin two of them, so for now the
23 define is switched off. */
24 #if 0
25 #ifndef _XOPEN_SOURCE
26 # define _XOPEN_SOURCE 500
27 #endif
28 #endif
30 /* Include nearly all Python header files */
32 #include "patchlevel.h"
33 #include "config.h"
35 /* config.h may or may not define DL_IMPORT */
36 #ifndef DL_IMPORT /* declarations for DLL import/export */
37 #define DL_IMPORT(RTYPE) RTYPE
38 #endif
39 #ifndef DL_EXPORT /* declarations for DLL import/export */
40 #define DL_EXPORT(RTYPE) RTYPE
41 #endif
43 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
44 #define _SGI_MP_SOURCE
45 #endif
47 #include <stdio.h>
48 #include <string.h>
49 #include <errno.h>
50 #ifdef HAVE_STDLIB_H
51 #include <stdlib.h>
52 #endif
53 #include <assert.h>
55 #include "pyport.h"
57 #include "pymem.h"
59 #include "object.h"
60 #include "objimpl.h"
62 #include "pydebug.h"
64 #include "unicodeobject.h"
65 #include "intobject.h"
66 #include "longobject.h"
67 #include "floatobject.h"
68 #ifndef WITHOUT_COMPLEX
69 #include "complexobject.h"
70 #endif
71 #include "rangeobject.h"
72 #include "stringobject.h"
73 #include "bufferobject.h"
74 #include "tupleobject.h"
75 #include "listobject.h"
76 #include "dictobject.h"
77 #include "methodobject.h"
78 #include "moduleobject.h"
79 #include "funcobject.h"
80 #include "classobject.h"
81 #include "fileobject.h"
82 #include "cobject.h"
83 #include "traceback.h"
84 #include "sliceobject.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 _GNU_PTH
120 /* GNU pth user-space thread support */
121 #include <pth.h>
122 #endif
123 #endif /* !Py_PYTHON_H */