![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 // This file is a modified version of Python 2.2/2.2.1 Python.h. As 00002 // such it is: 00003 // 00004 // Copyright (c) 2001, 2002 Python Software Foundation; All Rights 00005 // Reserved 00006 // 00007 // boostinspect:nolicense (don't complain about the lack of a Boost license) 00008 // 00009 // Changes from the original: 00010 // 1. #includes <unistd.h> for Python 2.2.1 00011 // 2. Provides missing extern "C" wrapper for "iterobject.h" and "descrobject.h". 00012 // 00013 00014 // Changes marked with "Boost.Python modification" 00015 #ifndef Py_PYTHON_H 00016 #define Py_PYTHON_H 00017 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */ 00018 00019 00020 /* Enable compiler features; switching on C lib defines doesn't work 00021 here, because the symbols haven't necessarily been defined yet. */ 00022 #ifndef _GNU_SOURCE 00023 # define _GNU_SOURCE 1 00024 #endif 00025 00026 /* Forcing SUSv2 compatibility still produces problems on some 00027 platforms, True64 and SGI IRIX begin two of them, so for now the 00028 define is switched off. */ 00029 #if 0 00030 #ifndef _XOPEN_SOURCE 00031 # define _XOPEN_SOURCE 500 00032 #endif 00033 #endif 00034 00035 /* Include nearly all Python header files */ 00036 00037 #include "patchlevel.h" 00038 #include "pyconfig.h" 00039 00040 #ifdef HAVE_LIMITS_H 00041 #include <limits.h> 00042 #endif 00043 00044 /* pyconfig.h may or may not define DL_IMPORT */ 00045 #ifndef DL_IMPORT /* declarations for DLL import/export */ 00046 #define DL_IMPORT(RTYPE) RTYPE 00047 #endif 00048 #ifndef DL_EXPORT /* declarations for DLL import/export */ 00049 #define DL_EXPORT(RTYPE) RTYPE 00050 #endif 00051 00052 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE) 00053 #define _SGI_MP_SOURCE 00054 #endif 00055 00056 #include <stdio.h> 00057 #ifndef NULL 00058 # error "Python.h requires that stdio.h define NULL." 00059 #endif 00060 00061 #include <string.h> 00062 #include <errno.h> 00063 #ifdef HAVE_STDLIB_H 00064 #include <stdlib.h> 00065 #endif 00066 #if PY_MICRO_VERSION == 1 // Boost.Python modification: emulate Python 2.2 00067 #ifdef HAVE_UNISTD_H 00068 #include <unistd.h> 00069 #endif 00070 #endif // Boost.Python modification: emulate Python 2.2 00071 00072 /* CAUTION: Build setups should ensure that NDEBUG is defined on the 00073 * compiler command line when building Python in release mode; else 00074 * assert() calls won't be removed. 00075 */ 00076 #include <assert.h> 00077 00078 #include "pyport.h" 00079 00080 #include "pymem.h" 00081 00082 #include "object.h" 00083 #include "objimpl.h" 00084 00085 #include "pydebug.h" 00086 00087 #include "unicodeobject.h" 00088 #include "intobject.h" 00089 #include "longobject.h" 00090 #include "floatobject.h" 00091 #ifndef WITHOUT_COMPLEX 00092 #include "complexobject.h" 00093 #endif 00094 #include "rangeobject.h" 00095 #include "stringobject.h" 00096 #include "bufferobject.h" 00097 #include "tupleobject.h" 00098 #include "listobject.h" 00099 #include "dictobject.h" 00100 #include "methodobject.h" 00101 #include "moduleobject.h" 00102 #include "funcobject.h" 00103 #include "classobject.h" 00104 #include "fileobject.h" 00105 #include "cobject.h" 00106 #include "traceback.h" 00107 #include "sliceobject.h" 00108 #include "cellobject.h" 00109 extern "C" { // Boost.Python modification: provide missing extern "C" 00110 #include "iterobject.h" 00111 #include "descrobject.h" 00112 } // Boost.Python modification: provide missing extern "C" 00113 #include "weakrefobject.h" 00114 00115 #include "codecs.h" 00116 #include "pyerrors.h" 00117 00118 #include "pystate.h" 00119 00120 #include "modsupport.h" 00121 #include "pythonrun.h" 00122 #include "ceval.h" 00123 #include "sysmodule.h" 00124 #include "intrcheck.h" 00125 #include "import.h" 00126 00127 #include "abstract.h" 00128 00129 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a)) 00130 #define PyArg_NoArgs(v) PyArg_Parse(v, "") 00131 00132 /* Convert a possibly signed character to a nonnegative int */ 00133 /* XXX This assumes characters are 8 bits wide */ 00134 #ifdef __CHAR_UNSIGNED__ 00135 #define Py_CHARMASK(c) (c) 00136 #else 00137 #define Py_CHARMASK(c) ((c) & 0xff) 00138 #endif 00139 00140 #include "pyfpe.h" 00141 00142 /* These definitions must match corresponding definitions in graminit.h. 00143 There's code in compile.c that checks that they are the same. */ 00144 #define Py_single_input 256 00145 #define Py_file_input 257 00146 #define Py_eval_input 258 00147 00148 #ifdef HAVE_PTH 00149 /* GNU pth user-space thread support */ 00150 #include <pth.h> 00151 #endif 00152 #endif /* !Py_PYTHON_H */