mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Fix some ctypes docs typos (GH-130307)
This commit is contained in:
parent
10b32054ad
commit
417372bd43
1 changed files with 2 additions and 2 deletions
|
@ -306,7 +306,7 @@ Since these types are mutable, their value can also be changed afterwards::
|
||||||
Assigning a new value to instances of the pointer types :class:`c_char_p`,
|
Assigning a new value to instances of the pointer types :class:`c_char_p`,
|
||||||
:class:`c_wchar_p`, and :class:`c_void_p` changes the *memory location* they
|
:class:`c_wchar_p`, and :class:`c_void_p` changes the *memory location* they
|
||||||
point to, *not the contents* of the memory block (of course not, because Python
|
point to, *not the contents* of the memory block (of course not, because Python
|
||||||
bytes objects are immutable)::
|
string objects are immutable)::
|
||||||
|
|
||||||
>>> s = "Hello, World"
|
>>> s = "Hello, World"
|
||||||
>>> c_s = c_wchar_p(s)
|
>>> c_s = c_wchar_p(s)
|
||||||
|
@ -689,7 +689,7 @@ This matches what ``#pragma pack(n)`` does in MSVC.
|
||||||
|
|
||||||
It is also possible to set a minimum alignment for how the subclass itself is packed in the
|
It is also possible to set a minimum alignment for how the subclass itself is packed in the
|
||||||
same way ``#pragma align(n)`` works in MSVC.
|
same way ``#pragma align(n)`` works in MSVC.
|
||||||
This can be achieved by specifying a ::attr:`~Structure._align_` class attribute
|
This can be achieved by specifying a :attr:`~Structure._align_` class attribute
|
||||||
in the subclass definition.
|
in the subclass definition.
|
||||||
|
|
||||||
:mod:`ctypes` uses the native byte order for Structures and Unions. To build
|
:mod:`ctypes` uses the native byte order for Structures and Unions. To build
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue