diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-28 10:54:50 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-30 15:01:56 +0000 |
commit | 6219fc1dad787fb24a5af72ff5c7b3fb062cb47b (patch) | |
tree | eff95ad256c1e6732763589c7b3782656a58a0ca | |
parent | 0de8ea20a19940625c11b3f7b214a05047d98ac2 (diff) |
shiboken6: Document builtin custom types
Task-number: PYSIDE-1660
Change-Id: Ia602fcad2bfca2e92bc7e8363ac096558c064114
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 2c5110afa7ccef7e9ed0e2b4ac26fc934054815a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/doc/typesystem.rst | 1 | ||||
-rw-r--r-- | sources/shiboken6/doc/typesystem_builtin_types.rst | 21 | ||||
-rw-r--r-- | sources/shiboken6/doc/typesystem_specifying_types.rst | 2 |
3 files changed, 24 insertions, 0 deletions
diff --git a/sources/shiboken6/doc/typesystem.rst b/sources/shiboken6/doc/typesystem.rst index b083f9c66..e1e4fdda2 100644 --- a/sources/shiboken6/doc/typesystem.rst +++ b/sources/shiboken6/doc/typesystem.rst @@ -22,6 +22,7 @@ Define types :maxdepth: 1 typesystem_specifying_types.rst + typesystem_builtin_types.rst Code generation --------------- diff --git a/sources/shiboken6/doc/typesystem_builtin_types.rst b/sources/shiboken6/doc/typesystem_builtin_types.rst new file mode 100644 index 000000000..fd70c5f54 --- /dev/null +++ b/sources/shiboken6/doc/typesystem_builtin_types.rst @@ -0,0 +1,21 @@ +.. _builtin-types: + +Built-in Types +-------------- + +.. _cpython-types: + +CPython Types +^^^^^^^^^^^^^ + +Python types like `str` match types like `PyUnicode` in the *Concrete Objects +Layer* of CPython. They have check functions like `PyUnicode_Check()`, which +Shiboken generates into the code checking the function arguments. + +These types occur as parameters when :ref:`adding functions <add-function>` +or :ref:`modifying types <replace-type>`, as type on `add-conversion` +within a :ref:`conversion-rule` or as target language API types on +:ref:`primitive-type`. + +They are built into Shiboken as :ref:`custom types <custom-type>` along +with their check functions. diff --git a/sources/shiboken6/doc/typesystem_specifying_types.rst b/sources/shiboken6/doc/typesystem_specifying_types.rst index a78226141..779ea3cf7 100644 --- a/sources/shiboken6/doc/typesystem_specifying_types.rst +++ b/sources/shiboken6/doc/typesystem_specifying_types.rst @@ -537,6 +537,8 @@ custom-type to provide one for function arguments modified to be custom types handled by injected code (see :ref:`replace-type`). + See :ref:`cpython-types` for built-in types. + .. _smart-pointer-type: smart-pointer-type |