| #if defined(_WIN32) || defined(__CYGWIN__) |
| #define Py_IMPORTED_SYMBOL __declspec(dllimport) |
| #define Py_EXPORTED_SYMBOL __declspec(dllexport) |
| * If we only ever used gcc >= 5, we could use __has_attribute(visibility) |
| * as a cross-platform way to determine if visibility is supported. However, |
| * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions |
| #define __has_attribute(x) 0 // Compatibility with non-clang compilers. |
| #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\ |
| (defined(__clang__) && __has_attribute(visibility)) |
| #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default"))) |
| #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default"))) |
| #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) |
| #define Py_IMPORTED_SYMBOL |
| #define Py_EXPORTED_SYMBOL |
| #endif /* Py_EXPORTS_H */ |