CdbExt: Fix Python-C API handling

From 3.10 onwards we need an additional macro when parsing
and building values.

Change-Id: Ia0bcdde467d87a1c7d22ec8657e050cdf5f1e52e
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2022-02-09 12:30:36 +01:00
parent 6ede8b3bc0
commit 8a29a78ebf
2 changed files with 2 additions and 2 deletions

View File

@@ -90,7 +90,7 @@ if (_library_enabled)
extend_qtc_library(qtcreatorcdbext extend_qtc_library(qtcreatorcdbext
DEPENDS "${Python3_LIBRARIES}" DEPENDS "${Python3_LIBRARIES}"
INCLUDES "${Python3_INCLUDE_DIRS}" INCLUDES "${Python3_INCLUDE_DIRS}"
DEFINES WITH_PYTHON=1 DEFINES WITH_PYTHON=1 PY_SSIZE_T_CLEAN
SOURCES SOURCES
pycdbextmodule.cpp pycdbextmodule.h pycdbextmodule.cpp pycdbextmodule.h
pyfield.cpp pyfield.h pyfield.cpp pyfield.h

View File

@@ -87,7 +87,7 @@ QtcLibrary {
Properties { Properties {
condition: pythonDllProbe.found condition: pythonDllProbe.found
cpp.defines: ["WITH_PYTHON=1"] cpp.defines: ["WITH_PYTHON=1", "PY_SSIZE_T_CLEAN"]
} }
cpp.includePaths: { cpp.includePaths: {
if (pythonDllProbe.found) if (pythonDllProbe.found)