From 7afe574643c7a985fe5b2071ea8caae7825d2feb Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sun, 31 May 2026 09:27:33 +0200 Subject: [PATCH] [3.13] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292) (GH-150651) (cherry picked from commit 73d8e9a47cc13ce1b9b1bdfdeaa958639b144f55) Co-authored-by: Patrick Rauscher --- Doc/library/multiprocessing.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 108fd4536da0..b8dc7341ba8b 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -1644,7 +1644,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 -- 2.47.3