From c18e1958334aa2e1c40e87097dade6f103e4ddf1 Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Tue, 10 Apr 2018 10:13:40 +0200 Subject: Upgrade shiboken diagrams and documentation Applied Qt-style to the diagrams: shapes, and colors. Removed references to Boost. Move the .rst links to the bottom of the files for better maintainability. Removed unused images and wrapped a few long lines. Aspell on the rst files. The links needs to be updated once we have the URL for the official documentation, since there are references to external documentation source directories. Task-number: PYSIDE-622 Change-Id: I2d553a29693ca4457e73a4ce5d78a2150501841d Reviewed-by: Christian Tismer --- sources/shiboken2/doc/sequenceprotocol.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'sources/shiboken2/doc/sequenceprotocol.rst') 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 ` 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 ` 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``. -- cgit v1.2.3