aboutsummaryrefslogtreecommitdiffstats
path: root/examples/scriptableapplication/pythonutils.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-05-08 16:06:23 +0200
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2022-01-05 12:11:44 +0100
commit49517d06cb09e36ecf00228bc8fa862a722842ed (patch)
tree4d0b7249269fa6ef5e100d061238e2fc31d0acd5 /examples/scriptableapplication/pythonutils.cpp
parenta0ef585ef721710e04ed844cf9fcf574725a2a38 (diff)
py3.10-prep: reset the type cache after feature switching
[ChangeLog][PySide6] Feature switching needs to reset the internal type cache. This was an omittion that becomes relevant in Python 3.10 . When using feature switching in Python 3.10, there were funny effects where switched and un-switched versions appeared to co-exist. It turned out that we were hit by function caching that is now implemented for the LOAD_ATTR opcode. It was not known that caching would happen at all for PySide classes because we don't use Py_TPFLAGS_VALID_VERSION_TAG. But actually, this flag is used internally by Python to do some optimizations, and we just have to notify the interpreter of type changes by PyType_Modified(). Task-number: PYSIDE-1436 Change-Id: Ie8a73f62bd6e9b8156b8ea23626fabd44700158b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> (cherry picked from commit 3a2b7c6f88bba04d8b7ddb571163d23c15c36a4f) Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples/scriptableapplication/pythonutils.cpp')
0 files changed, 0 insertions, 0 deletions