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.

27 lines
922 B

  1. --- a/hardware/plugins/DelayedLink.h
  2. +++ b/hardware/plugins/DelayedLink.h
  3. @@ -14,6 +14,16 @@
  4. #include <frameobject.h>
  5. #include "../../main/Helper.h"
  6. +#ifndef _Py_DEC_REFTOTAL
  7. + /* _Py_DEC_REFTOTAL macro has been removed from Python 3.9 by:
  8. + https://github.com/python/cpython/commit/49932fec62c616ec88da52642339d83ae719e924 */
  9. +# ifdef Py_REF_DEBUG
  10. +# define _Py_DEC_REFTOTAL _Py_RefTotal--
  11. +# else
  12. +# define _Py_DEC_REFTOTAL
  13. +# endif
  14. +#endif
  15. +
  16. #if PY_VERSION_HEX >= 0x030800f0
  17. static inline void
  18. py3__Py_DECREF(const char *filename, int lineno, PyObject *op)
  19. @@ -195,6 +205,7 @@ namespace Plugins {
  20. if (!shared_lib_) shared_lib_ = LoadLibrary("python34.dll");
  21. # endif
  22. #else
  23. + if (!shared_lib_) FindLibrary("python3.9", true);
  24. if (!shared_lib_) FindLibrary("python3.8", true);
  25. if (!shared_lib_) FindLibrary("python3.7", true);
  26. if (!shared_lib_) FindLibrary("python3.6", true);