aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/doc/sequenceprotocol.rst
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-04-26 08:03:54 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-04-26 08:04:41 +0200
commit9b01aae7777c7ccde9eed1a8c55aead1524e00e5 (patch)
treec62834ca412f290485dd96d2a7522809b8fce6e1 /sources/shiboken2/doc/sequenceprotocol.rst
parent2156651b39fbb6717ed936c94dcd28295436e0a4 (diff)
parent0b842db3a95a44fbda3379d2093cb52f8ae2a1ff (diff)
Merge remote-tracking branch 'origin/5.9' into 5.11
Diffstat (limited to 'sources/shiboken2/doc/sequenceprotocol.rst')
-rw-r--r--sources/shiboken2/doc/sequenceprotocol.rst16
1 files changed, 11 insertions, 5 deletions
diff --git a/sources/shiboken2/doc/sequenceprotocol.rst b/sources/shiboken2/doc/sequenceprotocol.rst
index 587c0f95b..26ae3b220 100644
--- a/sources/shiboken2/doc/sequenceprotocol.rst
+++ b/sources/shiboken2/doc/sequenceprotocol.rst
@@ -1,7 +1,8 @@
Sequence Protocol
-----------------
-Support for the sequence protocol is achieved adding functions with special names, this is done using the add-function tag.
+Support for the sequence protocol is achieved adding functions with special
+names, this is done using the add-function tag.
The special function names are:
@@ -15,9 +16,14 @@ The special function names are:
__concat__ PyObject* self, PyObject* _other PyObject* PySequence_Concat
============= =============================================== ==================== ===================
-You just need to inform the function name to the add-function tag, without any parameter or return type information, when you do it, |project| will create a C function with parameters and return type definied by the table above.
+You just need to inform the function name to the add-function tag, without any
+parameter or return type information, when you do it, |project| will create a C
+function with parameters and return type defined by the table above.
-The function needs to follow the same semantics of the *CPython equivalent* function, the only way to do it is using the :doc:`inject-code <codeinjectionsemantics>` tag.
-
-A concrete exemple how to add sequence protocol support to a class can be found on shiboken tests, more precisely in the definition of the Str class in ``tests/samplebinding/typesystem_sample.xml``.
+The function needs to follow the same semantics of the *CPython equivalent*
+function, the only way to do it is using the
+:doc:`inject-code <codeinjectionsemantics>` tag.
+A concrete example how to add sequence protocol support to a class can be found
+on shiboken tests, more precisely in the definition of the Str class in
+``tests/samplebinding/typesystem_sample.xml``.