aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-08-29 16:19:26 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-08-30 09:36:24 +0200
commitf21dd80f7cab5ce6510336be3362166610d6932c (patch)
treeea25cd66130581c13424afb384eed705b724458c
parent940cad174f891a4b04af9bcc61aed1c8e8c6d4ae (diff)
Fix shiboken module documentation
Fix the module name and add VoidPtr. Pick-to: 6.5 6.2 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>
-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``.