| 1 |
#ifndef Py_EXPORTS_H |
| 2 |
#define Py_EXPORTS_H |
| 3 |
|
| 4 |
#if defined(_WIN32) || defined(__CYGWIN__) |
| 5 |
#define Py_IMPORTED_SYMBOL __declspec(dllimport) |
| 6 |
#define Py_EXPORTED_SYMBOL __declspec(dllexport) |
| 7 |
#define Py_LOCAL_SYMBOL |
| 8 |
#else |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
#ifndef __has_attribute |
| 16 |
#define __has_attribute(x) 0 // Compatibility with non-clang compilers. |
| 17 |
#endif |
| 18 |
#if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\ |
| 19 |
(defined(__clang__) && __has_attribute(visibility)) |
| 20 |
#define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default"))) |
| 21 |
#define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default"))) |
| 22 |
#define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden"))) |
| 23 |
#else |
| 24 |
#define Py_IMPORTED_SYMBOL |
| 25 |
#define Py_EXPORTED_SYMBOL |
| 26 |
#define Py_LOCAL_SYMBOL |
| 27 |
#endif |
| 28 |
#endif |
| 29 |
|
| 30 |
#endif |