aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-08-29 16:19:26 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-30 09:45:21 +0000
commit03ae79b1038b7dc49cd8c4ea5675f4f24b8dd35f (patch)
treeaa4e41f8dc41f8e2fff64d5b05fc72d9bbe96e2f
parentf059a487ff660e8e6e9ee390eb367c81a7705015 (diff)
Fix shiboken module documentation
Fix the module name and add VoidPtr. Change-Id: If4c2188f71443bdcdef2b361a80557229ef459cf Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> (cherry picked from commit f21dd80f7cab5ce6510336be3362166610d6932c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/doc/shibokenmodule.rst23
1 files changed, 22 insertions, 1 deletions
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``.