aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysideutils.h
Commit message (Collapse)AuthorAgeFilesLines
* libshiboken: Split out PEP functions from sbkpython.hFriedemann Kleint2025-09-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libshiboken provides replacement functions prefixed "Pep" for functions missing from the limited API or appearing in future Python versions (pep384impl.h, bufferprocs_py37.h, pep384ext.h). This used to be included in the sbkpython.h header, which provides a sanitized Python.h. This patch removes the PEP headers from sbkpython.h header, requiring code using the replacement functions to explicitly include new headers (sbkpep.h, sbkpepbuffer.h). The generator automatically includes sbkpep.h for code snippet compatibility. The aim is to be able to identify code using the replacement functions. It is expected that the usage decreases over time as the Limited API versions are raised and more eplacement functions become obsolete. [ChangeLog][shiboken6] libshiboken's replacement functions providing functions missing from the limited API or appearing in future Python versions have been moved from sbkpython.h (providing a sanitized Python.h) to separate headers sbkpep.h and sbkpepbuffer.h (providing buffer API). This should not affect binding code as the generator includes the new headers, but may require adaption in client code using libshiboken/libpyside directly. Task-number: PYSIDE-3171 Change-Id: I5d79a40ba6755a80c8da99e4ddd6ef93463b4ddf Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Reduce usage of PyTypeObject::tp_nameFriedemann Kleint2025-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | In the Limited API, PyTypeObject is an opaque struct, for which libshiboken provides a dummy definition. PyType_GetFullyQualifiedName() (stable API since 3.13) can be used as a replacement, but it returns a PyObject. Add a convenience function PepType_GetFullyQualifiedNameStr() similar to the existing PepType_GetNameStr() to return a C-string. Leave the 3.13 code commented out for the moment since it causes a crash. This does not cover occurrences of tp_name passed as strings to Python formatting functions using the %s placeholder since that can be replaced by the new %N/%T placeholder starting from 3.13. Task-number: PYSIDE-3171 Change-Id: I4a073872cd0d138b8d8c6aafb08ccb33451812ca Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* Move helper function isCompiledMethod() to libshibokenFriedemann Kleint2025-03-201-0/+2
| | | | | | | Pick-to: 6.9 Task-number: PYSIDE-2916 Change-Id: I6e72977bfcf95c3c28cc160e07febb84220fa505 Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
* libpyside: Add a debug operator for a Py_BufferFriedemann Kleint2024-03-141-0/+9
| | | | | | Task-number: PYSIDE-2628 Change-Id: I34646f76f509ec30e3d63fc8df296d2b5692ff0e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* Replace <QtCore/QtGlobal> by respective smaller headersFriedemann Kleint2024-01-251-1/+1
| | | | | | | Task-number: QTBUG-99313 Task-number: QTBUG-97601 Change-Id: I2422a995d73f19e385c73d54410004f7b8f9d77b Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Add QDebug operators for PyTypeObject/PyObjectFriedemann Kleint2023-08-281-0/+19
| | | | | | | | | | Complement the operators std::ostream in libshiboken which are very verbose, outputting all flags and refcounts, by simple operators for QDebug which basically output a simple type: value. Change-Id: Icf99c55cd64d63eb9d2e47b40fdc6df88e9119e3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use SPDX license identifiersLucie Gérard2022-05-271-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I065150015bdb84a3096b5b39c061cf0a20ab637d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* libpyside: Add QString to UNICODE conversionFriedemann Kleint2022-04-291-2/+6
| | | | | | | | Complements dffe483604d6371112da6ef5ad40c6dfcee20f76. Task-number: PYSIDE-1898 Change-Id: I65bf5631ca2507a6488db370dfc8972b1a1e3c5f Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Move the UNICODE conversion into the libraryFriedemann Kleint2022-04-281-0/+3
| | | | | | Task-number: PYSIDE-1898 Change-Id: I8ed11bb3f46a5e26adf8bcb7aa3f083adde40628 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Move helper isCompiledMethod() to pysideutils.hFriedemann Kleint2022-01-191-0/+2
| | | | | | | | | | | It appears to be a general use helper function which could be useful outside signalmanager as well. Amends 56f66f128566bd08f027fee46bb42a6c4f57a26e. Task-number: PYSIDE-1755 Change-Id: I449243bb5d800ba4d271b3079ad394810d468312 Reviewed-by: Christian Tismer <tismer@stackless.com>
* libpyside: Split up the pyside.h headerFriedemann Kleint2021-11-261-0/+68
Changing something in pyside.h caused excessive recompiling of all wrappers. Try to amend the situation by splitting up the header and include only what is needed. pyside.h remains as a header including the others which will be emptied out by further changes splitting out QML functionality. [ChangeLog][PySide6] The header pyside.h has been split into smaller headers. Task-number: PYSIDE-1709 Change-Id: I89ff3d9d9bc486f194ad3ec62ed372ff0be960f2 Reviewed-by: Christian Tismer <tismer@stackless.com>