File indexing completed on 2025-11-19 09:50:53
0001 #ifndef Py_EXPORTS_H
0002 #define Py_EXPORTS_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #if defined(__CYGWIN__)
0024 # define HAVE_DECLSPEC_DLL
0025 #endif
0026
0027 #if defined(_WIN32) || defined(__CYGWIN__)
0028 #if defined(Py_ENABLE_SHARED)
0029 #define Py_IMPORTED_SYMBOL __declspec(dllimport)
0030 #define Py_EXPORTED_SYMBOL __declspec(dllexport)
0031 #define Py_LOCAL_SYMBOL
0032 #else
0033 #define Py_IMPORTED_SYMBOL
0034 #define Py_EXPORTED_SYMBOL
0035 #define Py_LOCAL_SYMBOL
0036 #endif
0037 #else
0038
0039
0040
0041
0042
0043
0044 #ifndef __has_attribute
0045 #define __has_attribute(x) 0
0046 #endif
0047 #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\
0048 (defined(__clang__) && __has_attribute(visibility))
0049 #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default")))
0050 #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
0051 #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden")))
0052 #else
0053 #define Py_IMPORTED_SYMBOL
0054 #define Py_EXPORTED_SYMBOL
0055 #define Py_LOCAL_SYMBOL
0056 #endif
0057 #endif
0058
0059
0060 #if defined(Py_ENABLE_SHARED) || defined(__CYGWIN__)
0061 # if defined(HAVE_DECLSPEC_DLL)
0062 # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
0063 # define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
0064 # define PyAPI_DATA(RTYPE) extern Py_EXPORTED_SYMBOL RTYPE
0065
0066
0067 # if defined(__CYGWIN__)
0068 # define PyMODINIT_FUNC Py_EXPORTED_SYMBOL PyObject*
0069 # else
0070 # define PyMODINIT_FUNC PyObject*
0071 # endif
0072 # else
0073
0074
0075
0076
0077
0078 # if !defined(__CYGWIN__)
0079 # define PyAPI_FUNC(RTYPE) Py_IMPORTED_SYMBOL RTYPE
0080 # endif
0081 # define PyAPI_DATA(RTYPE) extern Py_IMPORTED_SYMBOL RTYPE
0082
0083 # if defined(__cplusplus)
0084 # define PyMODINIT_FUNC extern "C" Py_EXPORTED_SYMBOL PyObject*
0085 # else
0086 # define PyMODINIT_FUNC Py_EXPORTED_SYMBOL PyObject*
0087 # endif
0088 # endif
0089 # endif
0090 #endif
0091
0092
0093 #ifndef PyAPI_FUNC
0094 # define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
0095 #endif
0096 #ifndef PyAPI_DATA
0097 # define PyAPI_DATA(RTYPE) extern Py_EXPORTED_SYMBOL RTYPE
0098 #endif
0099 #ifndef PyMODINIT_FUNC
0100 # if defined(__cplusplus)
0101 # define PyMODINIT_FUNC extern "C" Py_EXPORTED_SYMBOL PyObject*
0102 # else
0103 # define PyMODINIT_FUNC Py_EXPORTED_SYMBOL PyObject*
0104 # endif
0105 #endif
0106
0107
0108 #endif