gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.2KB

  1. #ifndef Py_EXPORTS_H
  2. #define Py_EXPORTS_H
  3. #if defined(_WIN32) || defined(__CYGWIN__)
  4. #if defined(Py_ENABLE_SHARED)
  5. #define Py_IMPORTED_SYMBOL __declspec(dllimport)
  6. #define Py_EXPORTED_SYMBOL __declspec(dllexport)
  7. #define Py_LOCAL_SYMBOL
  8. #else
  9. #define Py_IMPORTED_SYMBOL
  10. #define Py_EXPORTED_SYMBOL
  11. #define Py_LOCAL_SYMBOL
  12. #endif
  13. #else
  14. /*
  15. * If we only ever used gcc >= 5, we could use __has_attribute(visibility)
  16. * as a cross-platform way to determine if visibility is supported. However,
  17. * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions
  18. * have 4 < gcc < 5.
  19. */
  20. #ifndef __has_attribute
  21. #define __has_attribute(x) 0 // Compatibility with non-clang compilers.
  22. #endif
  23. #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\
  24. (defined(__clang__) && __has_attribute(visibility))
  25. #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default")))
  26. #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
  27. #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden")))
  28. #else
  29. #define Py_IMPORTED_SYMBOL
  30. #define Py_EXPORTED_SYMBOL
  31. #define Py_LOCAL_SYMBOL
  32. #endif
  33. #endif
  34. #endif /* Py_EXPORTS_H */
上海开阖软件有限公司 沪ICP备12045867号-1