Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:38

0001 // This file is a modified version of Python 2.2/2.2.1 Python.h. As
0002 // such it is:
0003 //
0004 //    Copyright (c) 2001, 2002 Python Software Foundation; All Rights
0005 //    Reserved
0006 //
0007 // boostinspect:nolicense (don't complain about the lack of a Boost license)
0008 //
0009 // Changes from the original:
0010 //  1. #includes <unistd.h> for Python 2.2.1
0011 //  2. Provides missing extern "C" wrapper for  "iterobject.h" and  "descrobject.h".
0012 //
0013 
0014 // Changes marked with "Boost.Python modification"
0015 #ifndef Py_PYTHON_H
0016 #define Py_PYTHON_H
0017 /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
0018 
0019 
0020 /* Enable compiler features; switching on C lib defines doesn't work
0021    here, because the symbols haven't necessarily been defined yet. */
0022 #ifndef _GNU_SOURCE
0023 # define _GNU_SOURCE    1
0024 #endif
0025 
0026 /* Forcing SUSv2 compatibility still produces problems on some
0027    platforms, True64 and SGI IRIX begin two of them, so for now the
0028    define is switched off. */
0029 #if 0
0030 #ifndef _XOPEN_SOURCE
0031 # define _XOPEN_SOURCE  500
0032 #endif
0033 #endif
0034 
0035 /* Include nearly all Python header files */
0036 
0037 #include "patchlevel.h"
0038 #include "pyconfig.h"
0039 
0040 #ifdef HAVE_LIMITS_H
0041 #include <limits.h>
0042 #endif
0043 
0044 /* pyconfig.h may or may not define DL_IMPORT */
0045 #ifndef DL_IMPORT       /* declarations for DLL import/export */
0046 #define DL_IMPORT(RTYPE) RTYPE
0047 #endif
0048 #ifndef DL_EXPORT       /* declarations for DLL import/export */
0049 #define DL_EXPORT(RTYPE) RTYPE
0050 #endif
0051 
0052 #if defined(__sgi) && defined(WITH_THREAD) && !defined(_SGI_MP_SOURCE)
0053 #define _SGI_MP_SOURCE
0054 #endif
0055 
0056 #include <stdio.h>
0057 #ifndef NULL
0058 #   error "Python.h requires that stdio.h define NULL."
0059 #endif
0060 
0061 #include <string.h>
0062 #include <errno.h>
0063 #ifdef HAVE_STDLIB_H
0064 #include <stdlib.h>
0065 #endif
0066 #if PY_MICRO_VERSION == 1 // Boost.Python modification: emulate Python 2.2
0067 #ifdef HAVE_UNISTD_H
0068 #include <unistd.h>
0069 #endif
0070 #endif // Boost.Python modification: emulate Python 2.2
0071 
0072 /* CAUTION:  Build setups should ensure that NDEBUG is defined on the
0073  * compiler command line when building Python in release mode; else
0074  * assert() calls won't be removed.
0075  */
0076 #include <assert.h>
0077 
0078 #include "pyport.h"
0079 
0080 #include "pymem.h"
0081 
0082 #include "object.h"
0083 #include "objimpl.h"
0084 
0085 #include "pydebug.h"
0086 
0087 #include "unicodeobject.h"
0088 #include "intobject.h"
0089 #include "longobject.h"
0090 #include "floatobject.h"
0091 #ifndef WITHOUT_COMPLEX
0092 #include "complexobject.h"
0093 #endif
0094 #include "rangeobject.h"
0095 #include "stringobject.h"
0096 #include "bufferobject.h"
0097 #include "tupleobject.h"
0098 #include "listobject.h"
0099 #include "dictobject.h"
0100 #include "methodobject.h"
0101 #include "moduleobject.h"
0102 #include "funcobject.h"
0103 #include "classobject.h"
0104 #include "fileobject.h"
0105 #include "cobject.h"
0106 #include "traceback.h"
0107 #include "sliceobject.h"
0108 #include "cellobject.h"
0109 extern "C" { // Boost.Python modification: provide missing extern "C"
0110 #include "iterobject.h"
0111 #include "descrobject.h"
0112 } // Boost.Python modification: provide missing extern "C"
0113 #include "weakrefobject.h"
0114 
0115 #include "codecs.h"
0116 #include "pyerrors.h"
0117 
0118 #include "pystate.h"
0119 
0120 #include "modsupport.h"
0121 #include "pythonrun.h"
0122 #include "ceval.h"
0123 #include "sysmodule.h"
0124 #include "intrcheck.h"
0125 #include "import.h"
0126 
0127 #include "abstract.h"
0128 
0129 #define PyArg_GetInt(v, a)      PyArg_Parse((v), "i", (a))
0130 #define PyArg_NoArgs(v)         PyArg_Parse(v, "")
0131 
0132 /* Convert a possibly signed character to a nonnegative int */
0133 /* XXX This assumes characters are 8 bits wide */
0134 #ifdef __CHAR_UNSIGNED__
0135 #define Py_CHARMASK(c)          (c)
0136 #else
0137 #define Py_CHARMASK(c)          ((c) & 0xff)
0138 #endif
0139 
0140 #include "pyfpe.h"
0141 
0142 /* These definitions must match corresponding definitions in graminit.h.
0143    There's code in compile.c that checks that they are the same. */
0144 #define Py_single_input 256
0145 #define Py_file_input 257
0146 #define Py_eval_input 258
0147 
0148 #ifdef HAVE_PTH
0149 /* GNU pth user-space thread support */
0150 #include <pth.h>
0151 #endif
0152 #endif /* !Py_PYTHON_H */