Skip to content

Commit

Permalink
Add Python3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
MinyazevR committed Nov 15, 2024
1 parent cac93a6 commit 7c88184
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PythonQt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static inline PyObject *PyCode_GetVarnames(PyCodeObject *o) {
}
#endif

#if PY_VERSION_HEX > 0x03080000 && defined(__linux__)
#if PY_VERSION_HEX >= 0x03080000 && defined(__linux__)
#include <dlfcn.h>
#include <link.h>
#include <stdio.h>
Expand Down Expand Up @@ -345,7 +345,7 @@ void PythonQt::preCleanup()

PythonQt* PythonQt::self() { return _self; }

#if PY_VERSION_HEX > 0x03080000 && defined(__linux__)
#if PY_VERSION_HEX >= 0x03080000 && defined(__linux__)
int find_libpython_callback(struct dl_phdr_info *info, size_t size, void *data) {
Q_UNUSED(size);
auto *library_name = (const char *)data;
Expand All @@ -365,7 +365,7 @@ PythonQt::PythonQt(int flags, const QByteArray& pythonQtModuleName)
_p = new PythonQtPrivate;
_p->_initFlags = flags;

#if PY_VERSION_HEX > 0x03080000 && defined(__linux__)
#if PY_VERSION_HEX >= 0x03080000 && defined(__linux__)
if (flags & ExternalModule) {
const char *library_name = "libpython";
if (dl_iterate_phdr(find_libpython_callback, (void *)library_name) != LD_LIBPYTHON_LOAD) {
Expand Down

0 comments on commit 7c88184

Please sign in to comment.