aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2
Commit message (Collapse)AuthorAgeFilesLines
* libshiboken: Remove left-over warnings pragmaFriedemann Kleint2018-09-251-4/+0
| | | | | | | | | Remove left-over from f61be404a9e197af33e169d1e81afb8df3f0546e, fixing: shiboken2\autodecref.h(109): warning C4193: #pragma warning(pop): no matching '#pragma warning(push)' Change-Id: I82a2b8627cd88393436568e12839a1ae988ac0dc Reviewed-by: Christian Tismer <tismer@stackless.com>
* shiboken: Initialize pointer members of TypedefEntryFriedemann Kleint2018-09-211-2/+2
| | | | | | | | Amends 2bfd1de3495b18c0ecc251260442a9a46009861e Task-number: PYSIDE-725 Change-Id: I4adb9022feee954ca65dc60f07bf71bd9b92dc11 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* shiboken: Flip the default behavior the --api-version optionFriedemann Kleint2018-09-2112-18/+76
| | | | | | | | | | | | | | | | | | | | | When no option was passed, all type system entries with a "since" would be silently excluded. For example, the scriptable application would only see Qt API that does not have a "since" attribute. This could be fixed by adding version options for all dependent Qt libraries it uses to the build steps, but this is tedious and error-prone. Flip the behavior such that an empty version list specification means "latest". Add helper functionality to clear the versions to the TypeDatabase and use that in the tests to start out with a clean list. Change the tests to use a QString for the version. Add a test for the new behavior. Task-number: PYSIDE-814 Change-Id: Ie6137ba6095ce562813bacbadbf4028d0e2c061f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-09-211-3/+4
|\ | | | | | | Change-Id: Ie4320a6ac584ec47ed8eaca538453a8e5b123c42
| * Release Py_buffer after gets its underlying pointerBoxiang Sun2018-09-191-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | PyObject_GetBuffer will increment the reference of Py_buffer, when the buffer is no longer being used, we should call PyBuffer_Release to reduce the reference count. See https://docs.python.org/3/c-api/buffer.html#c.PyBuffer_Release Task-number: PYSIDE-140 Change-Id: Ia7c231aff317252db83b2405237031fc73af2651 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libshikoken: Refactor the Visitor class hierarchyFriedemann Kleint2018-09-192-93/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementing the deleteInMainThread feature requires being able to collect a list of destructors and potentially storing it. This requires splitting out the actual deallocation/destructor calls from the DtorCallerVisitor and DeallocVisitor classes. Since this is the only use of the virtual HierarchyVisitor::done() method (and it does not really belong to the visitor pattern), remove it. Change the void visit() method into a bool from which true can be returned to terminate. The finish()/wasFinished() methods can then also be removed from HierarchyVisitor and the code simplified accordingly. Replace the DtorCallerVisitor and DeallocVisitor classes by DtorAccumulatorVisitor that collects a list of DestructorEntry structs containing destructor function and C++ instance. Polish the code a bit, use member initialization, add override, move implementations to source and some spacing for clarity. Task-number: PYSIDE-810 Change-Id: I5e3ef6df753679ec111a5f0d1b75305bd5cf1c0c Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Use correct function to find the typesystem entry when parsingFriedemann Kleint2018-09-181-2/+2
| | | | | | | | | | Change-Id: I8f8138e405eaac86cd3012b703c28ff77aa4e2c8 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Refactor code for querying functions of AbstractMetaClassFriedemann Kleint2018-09-182-53/+81
| | | | | | | | | | | | | | | | | | Move the checking code to a static method taking an AbstractMetaFunction and add static methods operating on a list. This makes it possible to implement checks without constructing temporary lists. Change-Id: I9b137858f81396f8243f2d1be5277e6a38be4c84 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Use member initialization in typesystem XML parserFriedemann Kleint2018-09-182-14/+10
| | | | | | | | | | Change-Id: I38b9e8a457371f5e364b06fc90821753df4af3e9 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Simplify code looking for copy constructorsFriedemann Kleint2018-09-183-15/+11
| | | | | | | | | | | | | | | | | | Replace various loops operating on lists by a convenience function AbstractMetaFunction *AbstractMetaClass::copyConstructor() const Change-Id: If38b954ae01856a84835a17a7e4d3e981b5aac9b Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Extend exception specificationFriedemann Kleint2018-09-179-25/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | Change boolean 'noexcept' flag into an enumeration that indicates whether a function throws, is 'noexcept' or the behavior is unknown. This makes it easier to implement an 'auto' mode for exception handling. Task-number: PYSIDE-62 Change-Id: I4e5405863e5af2a54f3528ba5eb5c51d3929703d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Do not generate implicit conversions for array-modified constructorsFriedemann Kleint2018-09-143-2/+15
| | | | | | | | | | | | | | | | | | | | | | Otherwise, syntax errors would be generated for QMatrix2x2(const float*), which is an array. Change-Id: Ic5c67e221934a4635c2bbeb83cd378ff4a02af66 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Improve handling of non-type template integer parametersFriedemann Kleint2018-09-138-18/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to specify the base class template<int R, int C> QGenericMatrix of the QMatrixRxN classes, clashes of the SBK..IDX enumeration values occurred since the integers were not part of the type name. Fix that by dynamically adding dummy entries of EnumValueTypeEntry for the integer values encountered on the fly. Task-number: PYSIDE-725 Change-Id: Ie6b4489b5293e04b7c2c76861341c99b136cd558 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Fix warnings about unused variablesFriedemann Kleint2018-09-132-1/+1
| | | | | | | | | | | | | | | | sources/shiboken2/tests/libsample/objecttype.cpp:283:17: warning: unused variable 'fake_child' [-Wunused-variable] sources/shiboken2/ApiExtractor/doxygenparser.cpp:71:15: warning: unused variable 'numPrefixes' [-Wunused-variable] Change-Id: I409f22e1450e9ae0f3f5924cb6dd47991d12a2ad Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Add default constructible with default valuesFriedemann Kleint2018-09-132-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the check for default constructible by also checking whether the first argument has an unmodified default value, for example: explicit QSqlIndex(const QString &cursorName = QString(), const QString &name = QString()); This can be treated like default constructible, except that {} may not be used for return values. Task-number: PYSIDE-62 Change-Id: I70af2a624de54201158a4b56e51b67ef115c2fc6 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Refactor Generator::minimalConstructor(AbstractMetaClass)Friedemann Kleint2018-09-133-82/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some convenience functions returning the status of default expressions to AbstractMetaArgument. Rewrite the function to only insert suitable candidates into an ordered multimap instead of looping twice over all candidates. This unearthed a bug in the old algorithm trying to find the maximum number of arguments: When no candidates were found, maxArgs was left at 0, which caused it to assume default constructible. This triggered for the QMatrixNxN classes inheriting QGenericMatrix<int, int, Type> with (unsupported) non-type template parameters. For these, the default constructor needs to be specified now. Task-number: PYSIDE-62 Change-Id: I5ce2bed43001780553048d8af0addaba2b22410b Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-09-122-3/+29
|\| | | | | | | Change-Id: Ie346fe7d7ac85ce0b82806904044680713375bf0
| * shiboken/pep384: Avoid warning by literal comparisonCristian Maureira-Fredes2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | Even though we are certain of the comparison, better to get rid of the warnings. Change-Id: Iafa51b4c59c2315b24fc9092d18792f0c9297553 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * Automate Parsing COIN testresults for exists_{platf}_{version}_ci.pyChristian Tismer2018-09-101-2/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The extraction of exists_{platf}_{version}_ci.py has been done by editing the testresults of COIN test by hand. Since the beginning of the year, this has become tedious, because COIN now surrounds everything with time stamps. This script scans the whole website and extracts all such files. Creation of the generated python pages becomes really easy now. The initial scan takes below 30 minutes. Then it will only parse new URLs. Task-number: PYSIDE-510 Change-Id: I1273f8a77596ced16c7a3653c89736c3e1796540 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | shiboken: Introduce DefaultValueFriedemann Kleint2018-09-124-64/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a small class storing the return value of Generator::minimalConstructor() consisting of a type enumeration and a value, offering formatting for the use cases variable initializations, return values and constructor arguments lists. Having distinct formatting for the different use cases has some advantages: - Can use nullptr without casts (except in constructor arguments lists, where the type is needed for disambiguation). - In the previous implementation using a string, "" indicated an error; so, it was not possible to use it for default-constructors. It is now possible to handle default-constructors for initialization ("Foo f" instead of "Foo f = Foo()". - Can use {} for return values. Task-number: PYSIDE-62 Change-Id: I73229cb957d4b92b43de4cdbc3c66703f48faa61 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Line-wrap message about not find function for modificationFriedemann Kleint2018-09-121-9/+11
| | | | | | | | | | | | | | | | Put each candidate on a new line and limit the number of member functions in the output. Change-Id: Ia628e61009997b37e0f3c2129fba5ccfa29f763e Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Store null enum valuesFriedemann Kleint2018-09-124-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | If an enum has a null value, store that on the EnumTypeEntry for use in Generator::minimalConstructor() as a default value. Fully qualify scoped enum value type entries for this purpose. The value can then be used for default values instead of an ugly static_cast<EnumType>(0). Task-number: PYSIDE-62 Change-Id: I42cb2ca63fb1da6c795df630ab30bded66aac901 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Centralize most msg* functions in a separate fileFriedemann Kleint2018-09-1017-354/+590
| | | | | | | | | | | | | | | | | | This makes it easier to maintain a consistent style, unclutters the source and allows for re-using formatting helpers. Change-Id: I4f29637a22afb457f629272e2d86f14bedb36008 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Remove blanks from void returnsFriedemann Kleint2018-09-101-26/+50
| | | | | | | | | | | | | | | | Introduce a little helper class for formatting "return;" or "return value;" depending on a string. Change-Id: I6005af5496696cd83819f1ddbf3f75858b09a49b Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Fix parsing of typedef typesystem entriesFriedemann Kleint2018-09-071-8/+12
| | | | | | | | | | | | | | | | | | Pop the parse stack entry for typedef entries as well which was overlooked in bfd1de3495b18c0ecc251260442a9a46009861e. Task-number: PYSIDE-725 Change-Id: If1f572076b9442ed3a434e3b6fb7b10c17def12d Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-09-071-1/+1
|\| | | | | | | Change-Id: I81270510e3a27915781a50769bb627e666970142
| * shiboken: Fix handling of dropped type entriesFriedemann Kleint2018-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When parsing the typesystem XML file, decrement variable containing the depth of dropped entries in Handler::endElement(). Otherwise, when dropping a type like <object-type name="QDtls" since="5.12"> <enum-type name="HandshakeState"/> </object-type> all subsequent entries would be droppped. Change-Id: I640a916e8c8dbddcaeaebc3859300cc2a0eb1b0c Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Initialize converter function to 0Friedemann Kleint2018-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings: QtCore/qmessagelogcontext_wrapper.cpp:265:9: warning: variable 'pythonToCpp' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized] if (!Shiboken::String::check(pyIn) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ QtCore/qmessagelogcontext_wrapper.cpp:271:5: note: uninitialized use occurs here pythonToCpp(pyIn, &cppOut_local); ^~~~~~~~~~~ QtCore/qmessagelogcontext_wrapper.cpp:265:9: note: remove the '&&' if its condition is always true if (!Shiboken::String::check(pyIn) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ QtCore/qmessagelogcontext_wrapper.cpp:264:32: note: initialize the variable 'pythonToCpp' to silence this warning PythonToCppFunc pythonToCpp; ^ = nullptr in generated code like: PythonToCppFunc pythonToCpp; if (!Shiboken::String::check(pyIn) && (pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter<const char*>(), (pyIn)))) { PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'file', 'char' or convertible type expected"); return -1; } Change-Id: I4f4f454d32e1a99d26cdf19807a801d98f9256d3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Improve error messages about rejected enumsFriedemann Kleint2018-09-061-7/+75
| | | | | | | | | | | | | | | | | | | | | | Use different messages for type entry not found and conflicting types. Spell out values of anonymous enums and indicate scoped enums and associated classes. Change-Id: Id60eb70c28790019b29ebae174369e6963909587 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Add a typedef typesystem entryFriedemann Kleint2018-09-0511-10/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | The intention is be able to specify typedef std::optional<int> OptionalInt in the typesystem file and generate code for it (without having a typedef in C++). Task-number: PYSIDE-725 Change-Id: I5847a3c3f68556ac1d0ea3635f65a29caa6cb208 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Add clone() to the typesystem entry classesFriedemann Kleint2018-09-052-1/+220
| | | | | | | | | | | | | | | | | | | | This is a prerequisite for adding a typedef entry. Add copy constructors and clone() methods. Task-number: PYSIDE-725 Change-Id: I7cee679432be70e2349071f1dd62335fda564fe3 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | shiboken: Replace more character #defines by char constantsFriedemann Kleint2018-09-054-203/+240
| | | | | | | | | | | | | | | | Break up macro concatenation and streamline code. Replace PYTHON_SELF_VAR by "self" since it is not going to change. Change-Id: Ibfffd12bd44eb4dc3390b0a0a2da99e003b04bdc Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | shiboken: Replace some character #defines by char constantsFriedemann Kleint2018-09-046-37/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change defines to variables where possible (not used in string literal concatenations). Remove constants only used in one file from the header. Change regular expressions to raw string literals for clarity. Replace static instance of the CONVERTTOCPP regular expressions by an accessor of ShibokenGenerator. Change PATH_SPLITTER in main.cpp define to a QChar constant. Change-Id: If6766e0467ca2c635788240414c984d60feef875 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Fix visibility of members of the generator classesFriedemann Kleint2018-09-043-169/+172
| | | | | | | | | | | | | | | | | | | | Make visibility more restricted by moving definitions to the private/protected section. Remove virtual from Generator::moduleName() since it is not overridden. Change-Id: I6b43f9679741fa8a5c453b339d9bb4228d74c04c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-09-044-4/+6
|\| | | | | | | Change-Id: Ie8025300580981c5349b31d4846a7f659481991d
| * shiboken/doc generator: Add FunctionMask case to avoid warningCristian Maureira-Fredes2018-09-031-0/+2
| | | | | | | | | | | | Change-Id: I13226628db54479cc01aab215bb52063684f23c9 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * shiboken/other test: Add override to avoid warningCristian Maureira-Fredes2018-09-031-1/+1
| | | | | | | | | | | | Change-Id: Idcd2d5fcd2d6f5ab6e15b529e1f73c73a5ff29a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
| * libshiboken: Use empty() to check for empty containers as clang-tidy advisesFriedemann Kleint2018-08-302-3/+3
| | | | | | | | | | | | | | | | | | Using the size() method for that purpose can be expensive for standard containers. Task-number: PYSIDE-727 Change-Id: I0da34e271503384a741d856fff5e84fee67bc97f Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libshiboken: Replace AutoDecRef::operator= by a reset() methodFriedemann Kleint2018-08-311-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The operators cause compiler warnings about multiple versions and missing return types. Replace them by a reset() method (modeled after std::unique_ptr, QScopedPointer). This implies some changes in the templates. Change-Id: I21a8fb9b84ecdfecf9671fa113f1bb3c6483166f Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | libshiboken: Fix clang-tidy warnings about class definitionsFriedemann Kleint2018-08-318-17/+38
| | | | | | | | | | | | | | | | | | | | | | | | - Add override - Use = default for trivial constructors/destructors - Delete copy and move constructors/assignment and move assignment operators where not needed - Use member initialization and remove constructors from simple structs - Use explicit where applicable Change-Id: Id293dd0008b05243e665347f12fd1dee3b1b70f7 Reviewed-by: Christian Tismer <tismer@stackless.com>
* | libshiboken: Fix remaining clang-tidy warningsFriedemann Kleint2018-08-304-10/+8
| | | | | | | | | | | | | | | | | | | | - Remove else after return/continue/break; unindent code or simplify return conditions - Fix C-style casts - Comment out unused parameter Change-Id: Iea1106023829658cd1ce005fa02d0c8940504dfd Reviewed-by: Christian Tismer <tismer@stackless.com>
* | shiboken: Remove data fields representing unimplemented attributesFriedemann Kleint2018-08-305-174/+4
| | | | | | | | | | | | | | | | | | Remove member variables and enumeration values. Task-number: PYSIDE-743 Change-Id: Id7bff33b180e99e19d02bd895e45e4f0749dc042 Reviewed-by: Christian Tismer <tismer@stackless.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | shiboken: Add support for const Foo* fieldsFriedemann Kleint2018-08-291-4/+23
| | | | | | | | | | | | | | | | Task-number: PYSIDE-304 Task-number: PYSIDE-672 Change-Id: Ic0e8e9ada594f27a8224adfb43847b3b8149c33d Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-08-292-77/+281
|\| | | | | | | Change-Id: I302543eef74bc1f3dc6340cdfab7510a66ea1b6a
| * Document the Signature ModuleChristian Tismer2018-08-272-61/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signature module is an extension that generates full introspection as a PySide feature. It is documented in detail to make it usable and extensible for other developers. Special care was taken about the interaction with the rest of the project, related code that is based upon this module, and the interaction with the COIN module. Task-number: PYSIDE-510 Change-Id: I7b3052da71a6fe3bd6d9cb8cc47443cdf976d3b0 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Make signature module unconditionalChristian Tismer2018-08-271-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | After the signature module has been around for quite a while, there is no longer a reason to leave it optional. At the same time, we set the minimum Python 3 version to 3.5 . Some comments are reworked as well, but nothing real changed. Task-number: PYSIDE-510 Change-Id: I9e960f390d507d24bb45f7028838755fe23e751d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | libpyside: Fix spelling of retrive->retrieveFriedemann Kleint2018-08-241-1/+1
| | | | | | | | | | | | | | Rename method and fix comments. Change-Id: I7765826540de0bf03ac41214d357e605d8e84bcf Reviewed-by: Christian Tismer <tismer@stackless.com>
* | Merge remote-tracking branch 'origin/5.11' into devFriedemann Kleint2018-08-245-300/+816
|\| | | | | | | Change-Id: Ide71a89ef173d6f3e1fa6960f7b15f1fd6cc1bf1
| * Document the Python Limited APIChristian Tismer2018-08-212-291/+704
| | | | | | | | | | | | | | | | | | | | | | | | | | The Python Limited API brings certain restrictions to PySide. This document contains an overview and all relevant changes. Furthermore, there are appendices which show how the type transformation of the extended types was done and how it was verified.. Task-number: PYSIDE-768 Change-Id: Ifd6fd3740c23deaed65cce1ba12f17e5f093f18f Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * Implement Proper Name ManglingChristian Tismer2018-08-214-9/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When types have attributes starting with two underscores but ending with at most one, Python uses name mangling to create a unique private variable. PySide needs to obey this rule in the tp_getattro methods. We implemented it as an optimized _Pep_PrivateMangle function that solves the problem internally without exposing the _Py_Mangle function. Remark: I think the exclusion of the _Py_Mangle function is another oversight in the Limited API. Task-number: PYSIDE-772 Change-Id: I0bfc2418dae439e963a16e37443f2099c6980696 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>