Skip to content

Commit 1190ee8

Browse files
[3.14] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292) (GH-150650)
(cherry picked from commit 73d8e9a) Co-authored-by: Patrick Rauscher <prauscher@prauscher.de>
1 parent 1b85d25 commit 1190ee8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Doc/library/multiprocessing.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,10 @@ inherited by child processes.
17131713
Note that *lock* is a keyword only argument.
17141714

17151715
Note that an array of :data:`ctypes.c_char` has *value* and *raw*
1716-
attributes which allow one to use it to store and retrieve strings.
1716+
attributes which can both be used to store and retrieve byte strings.
1717+
While *raw* allows interaction with a :class:`bytes` object the full size of
1718+
the array, reading *value* will terminate after a null byte, like most
1719+
programming languages handle strings.
17171720

17181721

17191722
The :mod:`!multiprocessing.sharedctypes` module

0 commit comments

Comments
 (0)