aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/libshiboken/sbkfeature_base.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2023-10-14 11:37:51 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-10-16 12:31:04 +0000
commitd90348de1e59a7e19085b29ed7af4c6266f1625c (patch)
tree73ad69c471d4a60a038a870d7b6f00dc8cc70957 /sources/shiboken6/libshiboken/sbkfeature_base.cpp
parent0649923ad351f434dd9689e7ebd49e82b47b47dc (diff)
Support running PySide on Python 3.12, cleanupv6.6.0
In the course of fixing 3.12 issues, a 3.11 fix for PyEnum was missing that created a 3.11 error. A bug with deployment was fixed but not reflected in the tests. This was only visible for pyenv users. Also fixes a minor cosmetic bug introduced by "Python 3.12: Fix the structure of class property" Task-number: PYSIDE-2230 Change-Id: I3a6bd6426e23168dfccdda17b408f193aacd28a0 Pick-to: 6.5 6.2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 29967cb08e6dfd19b0e49013d3b936f9fd18c6a2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources/shiboken6/libshiboken/sbkfeature_base.cpp')
-rw-r--r--sources/shiboken6/libshiboken/sbkfeature_base.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/shiboken6/libshiboken/sbkfeature_base.cpp b/sources/shiboken6/libshiboken/sbkfeature_base.cpp
index 330521dec..d075b565c 100644
--- a/sources/shiboken6/libshiboken/sbkfeature_base.cpp
+++ b/sources/shiboken6/libshiboken/sbkfeature_base.cpp
@@ -76,6 +76,7 @@ static int const CALL = 171;
// Python 3.11
static int const PRECALL = 166;
// we have "big instructions" with gaps after them
+static int const LOAD_METHOD_GAP_311 = 10 * 2;
static int const LOAD_ATTR_GAP_311 = 4 * 2;
static int const LOAD_ATTR_GAP = 9 * 2;
// Python 3.7 - 3.10
@@ -136,7 +137,9 @@ static bool currentOpcode_Is_CallMethNoArgs()
// With Python 3.11, the opcodes get bigger and change a bit.
// Note: The new adaptive opcodes are elegantly hidden and we
// don't need to take care of them.
- if (opcode1 == LOAD_ATTR)
+ if (opcode1 == LOAD_METHOD)
+ f_lasti += LOAD_METHOD_GAP_311;
+ else if (opcode1 == LOAD_ATTR)
f_lasti += LOAD_ATTR_GAP_311;
else
return false;