]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292)
authorPatrick Rauscher <prauscher@prauscher.de>
Sun, 31 May 2026 07:20:49 +0000 (09:20 +0200)
committerGitHub <noreply@github.com>
Sun, 31 May 2026 07:20:49 +0000 (10:20 +0300)
Doc/library/multiprocessing.rst

index 7b17df08f7dc712664505992c8c32a14bfaa9a87..2d13053915830b0ca3159873dfc7bcd94ecac416 100644 (file)
@@ -1723,7 +1723,10 @@ inherited by child processes.
    Note that *lock* is a keyword only argument.
 
    Note that an array of :data:`ctypes.c_char` has *value* and *raw*
-   attributes which allow one to use it to store and retrieve strings.
+   attributes which can both be used to store and retrieve byte strings.
+   While *raw* allows interaction with a :class:`bytes` object the full size of
+   the array, reading *value* will terminate after a null byte, like most
+   programming languages handle strings.
 
 
 The :mod:`!multiprocessing.sharedctypes` module