Skip to content

Commit 7afe574

Browse files
[3.13] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292) (GH-150651)
(cherry picked from commit 73d8e9a) Co-authored-by: Patrick Rauscher <prauscher@prauscher.de>
1 parent 42f3fbf commit 7afe574

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
@@ -1644,7 +1644,10 @@ inherited by child processes.
16441644
Note that *lock* is a keyword only argument.
16451645

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

16491652

16501653
The :mod:`multiprocessing.sharedctypes` module

0 commit comments

Comments
 (0)