File indexing completed on 2025-01-18 10:06:49
0001 #ifndef Py_EXPORTS_H
0002 #define Py_EXPORTS_H
0003
0004 #if defined(_WIN32) || defined(__CYGWIN__)
0005 #if defined(Py_ENABLE_SHARED)
0006 #define Py_IMPORTED_SYMBOL __declspec(dllimport)
0007 #define Py_EXPORTED_SYMBOL __declspec(dllexport)
0008 #define Py_LOCAL_SYMBOL
0009 #else
0010 #define Py_IMPORTED_SYMBOL
0011 #define Py_EXPORTED_SYMBOL
0012 #define Py_LOCAL_SYMBOL
0013 #endif
0014 #else
0015
0016
0017
0018
0019
0020
0021 #ifndef __has_attribute
0022 #define __has_attribute(x) 0
0023 #endif
0024 #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\
0025 (defined(__clang__) && __has_attribute(visibility))
0026 #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default")))
0027 #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
0028 #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden")))
0029 #else
0030 #define Py_IMPORTED_SYMBOL
0031 #define Py_EXPORTED_SYMBOL
0032 #define Py_LOCAL_SYMBOL
0033 #endif
0034 #endif
0035
0036 #endif