mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (#25384)
The implementation uses 'ptr' for the name of the first parameter of ctypes.string_at() and ctypes.wstring_at(). Align docs and docstrings with the naming used in the implementation. Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
This commit is contained in:
parent
340a02b590
commit
81a926bd20
2 changed files with 12 additions and 12 deletions
|
|
@ -2077,13 +2077,13 @@ Utility functions
|
|||
Does the same as the C ``sizeof`` operator.
|
||||
|
||||
|
||||
.. function:: string_at(address, size=-1)
|
||||
.. function:: string_at(ptr, size=-1)
|
||||
|
||||
This function returns the C string starting at memory address *address* as a bytes
|
||||
object. If size is specified, it is used as size, otherwise the string is assumed
|
||||
Return the byte string at *void \*ptr*.
|
||||
If *size* is specified, it is used as size, otherwise the string is assumed
|
||||
to be zero-terminated.
|
||||
|
||||
.. audit-event:: ctypes.string_at address,size ctypes.string_at
|
||||
.. audit-event:: ctypes.string_at ptr,size ctypes.string_at
|
||||
|
||||
|
||||
.. function:: WinError(code=None, descr=None)
|
||||
|
|
@ -2099,14 +2099,14 @@ Utility functions
|
|||
alias of :exc:`OSError`.
|
||||
|
||||
|
||||
.. function:: wstring_at(address, size=-1)
|
||||
.. function:: wstring_at(ptr, size=-1)
|
||||
|
||||
This function returns the wide character string starting at memory address
|
||||
*address* as a string. If *size* is specified, it is used as the number of
|
||||
Return the wide-character string at *void \*ptr*.
|
||||
If *size* is specified, it is used as the number of
|
||||
characters of the string, otherwise the string is assumed to be
|
||||
zero-terminated.
|
||||
|
||||
.. audit-event:: ctypes.wstring_at address,size ctypes.wstring_at
|
||||
.. audit-event:: ctypes.wstring_at ptr,size ctypes.wstring_at
|
||||
|
||||
|
||||
.. _ctypes-data-types:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue