annotate DEPENDENCIES/generic/include/boost/python/detail/python22_fixed.h @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // This file is a modified version of Python 2.2/2.2.1 Python.h. As
Chris@16 2 // such it is:
Chris@16 3 //
Chris@16 4 // Copyright (c) 2001, 2002 Python Software Foundation; All Rights
Chris@16 5 // Reserved
Chris@16 6 //
Chris@16 7 // boostinspect:nolicense (don't complain about the lack of a Boost license)
Chris@16 8 //
Chris@16 9 // Changes from the original:
Chris@16 10 // 1. #includes <unistd.h> for Python 2.2.1
Chris@16 11 // 2. Provides missing extern "C" wrapper for "iterobject.h" and "descrobject.h".
Chris@16 12 //
Chris@16 13
Chris@16 14 // Changes marked with "Boost.Python modification"
Chris@16 15 #ifndef Py_PYTHON_H
Chris@16 16 #define Py_PYTHON_H
Chris@16 17 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
Chris@16 18
Chris@16 19
Chris@16 20 /* Enable compiler features; switching on C lib defines doesn't work
Chris@16 21 here, because the symbols haven't necessarily been defined yet. */
Chris@16 22 #ifndef _GNU_SOURCE
Chris@16 23 # define _GNU_SOURCE 1
Chris@16 24 #endif
Chris@16 25
Chris@16 26 /* Forcing SUSv2 compatibility still produces problems on some
Chris@16 27 platforms, True64 and SGI IRIX begin two of them, so for now the
Chris@16 28 define is switched off. */
Chris@16 29 #if 0
Chris@16 30 #ifndef _XOPEN_SOURCE
Chris@16 31 # define _XOPEN_SOURCE 500
Chris@16 32 #endif
Chris@16 33 #endif
Chris@16 34
Chris@16 35 /* Include nearly all Python header files */
Chris@16 36
Chris@16 37 #include "patchlevel.h"
Chris@16 38 #include "pyconfig.h"
Chris@16 39
Chris@16 40 #ifdef HAVE_LIMITS_H
Chris@16 41 #include <limits.h>
Chris@16 42 #endif
Chris@16 43
Chris@16 44 /* pyconfig.h may or may not define DL_IMPORT */
Chris@16 45 #ifndef DL_IMPORT /* declarations for DLL import/export */
Chris@16 46 #define DL_IMPORT(RTYPE) RTYPE
Chris@16 47 #endif
Chris@16 48 #ifndef DL_EXPORT /* declarations for DLL import/export */
Chris@16 49 #define DL_EXPORT(RTYPE) RTYPE
Chris@16 50 #endif
Chris@16 51
Chris@16 52 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
Chris@16 53 #define _SGI_MP_SOURCE
Chris@16 54 #endif
Chris@16 55
Chris@16 56 #include <stdio.h>
Chris@16 57 #ifndef NULL
Chris@16 58 # error "Python.h requires that stdio.h define NULL."
Chris@16 59 #endif
Chris@16 60
Chris@16 61 #include <string.h>
Chris@16 62 #include <errno.h>
Chris@16 63 #ifdef HAVE_STDLIB_H
Chris@16 64 #include <stdlib.h>
Chris@16 65 #endif
Chris@16 66 #if PY_MICRO_VERSION == 1 // Boost.Python modification: emulate Python 2.2
Chris@16 67 #ifdef HAVE_UNISTD_H
Chris@16 68 #include <unistd.h>
Chris@16 69 #endif
Chris@16 70 #endif // Boost.Python modification: emulate Python 2.2
Chris@16 71
Chris@16 72 /* CAUTION: Build setups should ensure that NDEBUG is defined on the
Chris@16 73 * compiler command line when building Python in release mode; else
Chris@16 74 * assert() calls won't be removed.
Chris@16 75 */
Chris@16 76 #include <assert.h>
Chris@16 77
Chris@16 78 #include "pyport.h"
Chris@16 79
Chris@16 80 #include "pymem.h"
Chris@16 81
Chris@16 82 #include "object.h"
Chris@16 83 #include "objimpl.h"
Chris@16 84
Chris@16 85 #include "pydebug.h"
Chris@16 86
Chris@16 87 #include "unicodeobject.h"
Chris@16 88 #include "intobject.h"
Chris@16 89 #include "longobject.h"
Chris@16 90 #include "floatobject.h"
Chris@16 91 #ifndef WITHOUT_COMPLEX
Chris@16 92 #include "complexobject.h"
Chris@16 93 #endif
Chris@16 94 #include "rangeobject.h"
Chris@16 95 #include "stringobject.h"
Chris@16 96 #include "bufferobject.h"
Chris@16 97 #include "tupleobject.h"
Chris@16 98 #include "listobject.h"
Chris@16 99 #include "dictobject.h"
Chris@16 100 #include "methodobject.h"
Chris@16 101 #include "moduleobject.h"
Chris@16 102 #include "funcobject.h"
Chris@16 103 #include "classobject.h"
Chris@16 104 #include "fileobject.h"
Chris@16 105 #include "cobject.h"
Chris@16 106 #include "traceback.h"
Chris@16 107 #include "sliceobject.h"
Chris@16 108 #include "cellobject.h"
Chris@16 109 extern "C" { // Boost.Python modification: provide missing extern "C"
Chris@16 110 #include "iterobject.h"
Chris@16 111 #include "descrobject.h"
Chris@16 112 } // Boost.Python modification: provide missing extern "C"
Chris@16 113 #include "weakrefobject.h"
Chris@16 114
Chris@16 115 #include "codecs.h"
Chris@16 116 #include "pyerrors.h"
Chris@16 117
Chris@16 118 #include "pystate.h"
Chris@16 119
Chris@16 120 #include "modsupport.h"
Chris@16 121 #include "pythonrun.h"
Chris@16 122 #include "ceval.h"
Chris@16 123 #include "sysmodule.h"
Chris@16 124 #include "intrcheck.h"
Chris@16 125 #include "import.h"
Chris@16 126
Chris@16 127 #include "abstract.h"
Chris@16 128
Chris@16 129 #define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
Chris@16 130 #define PyArg_NoArgs(v) PyArg_Parse(v, "")
Chris@16 131
Chris@16 132 /* Convert a possibly signed character to a nonnegative int */
Chris@16 133 /* XXX This assumes characters are 8 bits wide */
Chris@16 134 #ifdef __CHAR_UNSIGNED__
Chris@16 135 #define Py_CHARMASK(c) (c)
Chris@16 136 #else
Chris@16 137 #define Py_CHARMASK(c) ((c) & 0xff)
Chris@16 138 #endif
Chris@16 139
Chris@16 140 #include "pyfpe.h"
Chris@16 141
Chris@16 142 /* These definitions must match corresponding definitions in graminit.h.
Chris@16 143 There's code in compile.c that checks that they are the same. */
Chris@16 144 #define Py_single_input 256
Chris@16 145 #define Py_file_input 257
Chris@16 146 #define Py_eval_input 258
Chris@16 147
Chris@16 148 #ifdef HAVE_PTH
Chris@16 149 /* GNU pth user-space thread support */
Chris@16 150 #include <pth.h>
Chris@16 151 #endif
Chris@16 152 #endif /* !Py_PYTHON_H */