From: Zackery Spytz Date: Mon, 5 Apr 2021 19:21:00 +0000 (-0600) Subject: bpo-43087: Fix error in ctypes "Incomplete Types" doc (GH-24404) X-Git-Tag: v3.10.0b1~405 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14829b09eb652f457cf837836909169746a810f0;p=thirdparty%2FPython%2Fcpython.git bpo-43087: Fix error in ctypes "Incomplete Types" doc (GH-24404) The previous "Fundamental data types" section says a c_char_p must be bytes (or None). --- diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index 7313148721da..fd6422cc8c06 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -919,9 +919,9 @@ Let's try it. We create two instances of ``cell``, and let them point to each other, and finally follow the pointer chain a few times:: >>> c1 = cell() - >>> c1.name = "foo" + >>> c1.name = b"foo" >>> c2 = cell() - >>> c2.name = "bar" + >>> c2.name = b"bar" >>> c1.next = pointer(c2) >>> c2.next = pointer(c1) >>> p = c1