| #ifndef Py_EXPORTS_H |
| #define Py_EXPORTS_H |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| #if defined(__CYGWIN__) |
| # define HAVE_DECLSPEC_DLL |
| #endif |
|
|
| #if defined(_WIN32) || defined(__CYGWIN__) |
| #if defined(Py_ENABLE_SHARED) |
| #define Py_IMPORTED_SYMBOL __declspec(dllimport) |
| #define Py_EXPORTED_SYMBOL __declspec(dllexport) |
| #define Py_LOCAL_SYMBOL |
| #else |
| #define Py_IMPORTED_SYMBOL |
| #define Py_EXPORTED_SYMBOL |
| #define Py_LOCAL_SYMBOL |
| #endif |
| #else |
| |
| |
| |
| |
| |
| |
| #ifndef __has_attribute |
| #define __has_attribute(x) 0 |
| #endif |
| #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"))) |
| #else |
| #define Py_IMPORTED_SYMBOL |
| #define Py_EXPORTED_SYMBOL |
| #define Py_LOCAL_SYMBOL |
| #endif |
| #endif |
|
|
| |
| #if defined(Py_ENABLE_SHARED) || defined(__CYGWIN__) |
| # if defined(HAVE_DECLSPEC_DLL) |
| # if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) |
| # define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE |
| # define PyAPI_DATA(RTYPE) extern Py_EXPORTED_SYMBOL RTYPE |
| |
| |
| # if defined(__CYGWIN__) |
| # define PyMODINIT_FUNC Py_EXPORTED_SYMBOL PyObject* |
| # else |
| # define PyMODINIT_FUNC PyObject* |
| # endif |
| # else |
| |
| |
| |
| |
| |
| # if !defined(__CYGWIN__) |
| # define PyAPI_FUNC(RTYPE) Py_IMPORTED_SYMBOL RTYPE |
| # endif |
| # define PyAPI_DATA(RTYPE) extern Py_IMPORTED_SYMBOL RTYPE |
| |
| # if defined(__cplusplus) |
| # define PyMODINIT_FUNC extern "C" Py_EXPORTED_SYMBOL PyObject* |
| # else |
| # define PyMODINIT_FUNC Py_EXPORTED_SYMBOL PyObject* |
| # endif |
| # endif |
| # endif |
| #endif |
|
|
| |
| #ifndef PyAPI_FUNC |
| # define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE |
| #endif |
| #ifndef PyAPI_DATA |
| # define PyAPI_DATA(RTYPE) extern Py_EXPORTED_SYMBOL RTYPE |
| #endif |
| #ifndef PyMODINIT_FUNC |
| # if defined(__cplusplus) |
| # define PyMODINIT_FUNC extern "C" Py_EXPORTED_SYMBOL PyObject* |
| # else |
| # define PyMODINIT_FUNC Py_EXPORTED_SYMBOL PyObject* |
| # endif |
| #endif |
|
|
|
|
| #endif |
|
|