]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/python/detail/python22_fixed.h
1 // This file is a modified version of Python 2.2/2.2.1 Python.h. As
4 // Copyright (c) 2001, 2002 Python Software Foundation; All Rights
7 // boostinspect:nolicense (don't complain about the lack of a Boost license)
9 // Changes from the original:
10 // 1. #includes <unistd.h> for Python 2.2.1
11 // 2. Provides missing extern "C" wrapper for "iterobject.h" and "descrobject.h".
14 // Changes marked with "Boost.Python modification"
17 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
20 /* Enable compiler features; switching on C lib defines doesn't work
21 here, because the symbols haven't necessarily been defined yet. */
23 # define _GNU_SOURCE 1
26 /* Forcing SUSv2 compatibility still produces problems on some
27 platforms, True64 and SGI IRIX begin two of them, so for now the
28 define is switched off. */
31 # define _XOPEN_SOURCE 500
35 /* Include nearly all Python header files */
37 #include "patchlevel.h"
44 /* pyconfig.h may or may not define DL_IMPORT */
45 #ifndef DL_IMPORT /* declarations for DLL import/export */
46 #define DL_IMPORT(RTYPE) RTYPE
48 #ifndef DL_EXPORT /* declarations for DLL import/export */
49 #define DL_EXPORT(RTYPE) RTYPE
52 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
53 #define _SGI_MP_SOURCE
58 # error "Python.h requires that stdio.h define NULL."
66 #if PY_MICRO_VERSION == 1 // Boost.Python modification: emulate Python 2.2
70 #endif // Boost.Python modification: emulate Python 2.2
72 /* CAUTION: Build setups should ensure that NDEBUG is defined on the
73 * compiler command line when building Python in release mode; else
74 * assert() calls won't be removed.
87 #include "unicodeobject.h"
88 #include "intobject.h"
89 #include "longobject.h"
90 #include "floatobject.h"
91 #ifndef WITHOUT_COMPLEX
92 #include "complexobject.h"
94 #include "rangeobject.h"
95 #include "stringobject.h"
96 #include "bufferobject.h"
97 #include "tupleobject.h"
98 #include "listobject.h"
99 #include "dictobject.h"
100 #include "methodobject.h"
101 #include "moduleobject.h"
102 #include "funcobject.h"
103 #include "classobject.h"
104 #include "fileobject.h"
106 #include "traceback.h"
107 #include "sliceobject.h"
108 #include "cellobject.h"
109 extern "C" { // Boost.Python modification: provide missing extern "C"
110 #include "iterobject.h"
111 #include "descrobject.h"
112 } // Boost.Python modification: provide missing extern "C"
113 #include "weakrefobject.h"
116 #include "pyerrors.h"
120 #include "modsupport.h"
121 #include "pythonrun.h"
123 #include "sysmodule.h"
124 #include "intrcheck.h"
127 #include "abstract.h"
129 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
130 #define PyArg_NoArgs(v) PyArg_Parse(v, "")
132 /* Convert a possibly signed character to a nonnegative int */
133 /* XXX This assumes characters are 8 bits wide */
134 #ifdef __CHAR_UNSIGNED__
135 #define Py_CHARMASK(c) (c)
137 #define Py_CHARMASK(c) ((c) & 0xff)
142 /* These definitions must match corresponding definitions in graminit.h.
143 There's code in compile.c that checks that they are the same. */
144 #define Py_single_input 256
145 #define Py_file_input 257
146 #define Py_eval_input 258
149 /* GNU pth user-space thread support */
152 #endif /* !Py_PYTHON_H */