From 03ae79b1038b7dc49cd8c4ea5675f4f24b8dd35f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 29 Aug 2023 16:19:26 +0200 Subject: Fix shiboken module documentation Fix the module name and add VoidPtr. Change-Id: If4c2188f71443bdcdef2b361a80557229ef459cf Reviewed-by: Alexandru Croitor Reviewed-by: Adrian Herrmann Reviewed-by: Shyamnath Premnadh (cherry picked from commit f21dd80f7cab5ce6510336be3362166610d6932c) Reviewed-by: Qt Cherry-pick Bot --- sources/shiboken6/doc/shibokenmodule.rst | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/sources/shiboken6/doc/shibokenmodule.rst b/sources/shiboken6/doc/shibokenmodule.rst index 75a97ff2c..b31efbcd1 100644 --- a/sources/shiboken6/doc/shibokenmodule.rst +++ b/sources/shiboken6/doc/shibokenmodule.rst @@ -1,4 +1,4 @@ -.. module:: shiboken +.. module:: Shiboken .. |maya| unicode:: Maya U+2122 @@ -32,6 +32,11 @@ or just for debug purposes. Some function description refer to "Shiboken based objects", wich means Python objects instances of any Python Type created using Shiboken. +To import the module: + +.. code-block:: python + + from shiboken6 import Shiboken .. function:: isValid(obj) @@ -110,3 +115,19 @@ Python objects instances of any Python Type created using Shiboken. internally the `str` function is called with it. This method should be used **only** for debug purposes by developers. + + .. py:class:: VoidPtr(address, size = -1, writeable = 0) + + :param address: (PyBuffer, SbkObject, int, VoidPtr) + :param size: int + :param writeable: int + + Represents a chunk of memory by address and size and implements the ``buffer`` protocol. + It can be constructed from a ``buffer``, a Shiboken based object, a memory address + or another VoidPtr instance. + + .. py:method:: toBytes() + + :rtype: bytes + + Returns the contents as ``bytes``. -- cgit v1.2.3