mirror of
https://github.com/python/cpython.git
synced 2025-08-15 22:30:42 +00:00
[3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949) (#107060)
* [3.12] gh-106948: Add standard external names to nitpick_ignore (GH-106949)
It includes standard C types, macros and variables like "size_t",
"LONG_MAX" and "errno", and standard environment variables like "PATH".
(cherry picked from commit f8b7fe2f26
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Delete 2023-05-31-18-37-57.gh-issue-105156.R4El5V.rst
This commit is contained in:
parent
98626c3c71
commit
456cf8b097
19 changed files with 89 additions and 44 deletions
|
@ -44,7 +44,7 @@ Python:
|
|||
|
||||
.. c:type:: Py_UNICODE
|
||||
|
||||
This is a typedef of :c:expr:`wchar_t`, which is a 16-bit type or 32-bit type
|
||||
This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit type
|
||||
depending on the platform.
|
||||
|
||||
.. versionchanged:: 3.3
|
||||
|
@ -444,11 +444,11 @@ APIs:
|
|||
+----------+-----------------------------------------------------+
|
||||
| ``ll`` | :c:expr:`long long` or :c:expr:`unsigned long long` |
|
||||
+----------+-----------------------------------------------------+
|
||||
| ``j`` | :c:expr:`intmax_t` or :c:expr:`uintmax_t` |
|
||||
| ``j`` | :c:type:`intmax_t` or :c:type:`uintmax_t` |
|
||||
+----------+-----------------------------------------------------+
|
||||
| ``z`` | :c:expr:`size_t` or :c:expr:`ssize_t` |
|
||||
| ``z`` | :c:type:`size_t` or :c:type:`ssize_t` |
|
||||
+----------+-----------------------------------------------------+
|
||||
| ``t`` | :c:expr:`ptrdiff_t` |
|
||||
| ``t`` | :c:type:`ptrdiff_t` |
|
||||
+----------+-----------------------------------------------------+
|
||||
|
||||
The length modifier ``l`` for following conversions ``s`` or ``V`` specify
|
||||
|
@ -527,7 +527,7 @@ APIs:
|
|||
|
||||
.. note::
|
||||
The width formatter unit is number of characters rather than bytes.
|
||||
The precision formatter unit is number of bytes or :c:expr:`wchar_t`
|
||||
The precision formatter unit is number of bytes or :c:type:`wchar_t`
|
||||
items (if the length modifier ``l`` is used) for ``"%s"`` and
|
||||
``"%V"`` (if the ``PyObject*`` argument is ``NULL``), and a number of
|
||||
characters for ``"%A"``, ``"%U"``, ``"%S"``, ``"%R"`` and ``"%V"``
|
||||
|
@ -846,11 +846,11 @@ conversion function:
|
|||
wchar_t Support
|
||||
"""""""""""""""
|
||||
|
||||
:c:expr:`wchar_t` support for platforms which support it:
|
||||
:c:type:`wchar_t` support for platforms which support it:
|
||||
|
||||
.. c:function:: PyObject* PyUnicode_FromWideChar(const wchar_t *w, Py_ssize_t size)
|
||||
|
||||
Create a Unicode object from the :c:expr:`wchar_t` buffer *w* of the given *size*.
|
||||
Create a Unicode object from the :c:type:`wchar_t` buffer *w* of the given *size*.
|
||||
Passing ``-1`` as the *size* indicates that the function must itself compute the length,
|
||||
using wcslen.
|
||||
Return ``NULL`` on failure.
|
||||
|
@ -858,9 +858,9 @@ wchar_t Support
|
|||
|
||||
.. c:function:: Py_ssize_t PyUnicode_AsWideChar(PyObject *unicode, wchar_t *w, Py_ssize_t size)
|
||||
|
||||
Copy the Unicode object contents into the :c:expr:`wchar_t` buffer *w*. At most
|
||||
*size* :c:expr:`wchar_t` characters are copied (excluding a possibly trailing
|
||||
null termination character). Return the number of :c:expr:`wchar_t` characters
|
||||
Copy the Unicode object contents into the :c:type:`wchar_t` buffer *w*. At most
|
||||
*size* :c:type:`wchar_t` characters are copied (excluding a possibly trailing
|
||||
null termination character). Return the number of :c:type:`wchar_t` characters
|
||||
copied or ``-1`` in case of an error. Note that the resulting :c:expr:`wchar_t*`
|
||||
string may or may not be null-terminated. It is the responsibility of the caller
|
||||
to make sure that the :c:expr:`wchar_t*` string is null-terminated in case this is
|
||||
|
@ -874,7 +874,7 @@ wchar_t Support
|
|||
Convert the Unicode object to a wide character string. The output string
|
||||
always ends with a null character. If *size* is not ``NULL``, write the number
|
||||
of wide characters (excluding the trailing null termination character) into
|
||||
*\*size*. Note that the resulting :c:expr:`wchar_t` string might contain
|
||||
*\*size*. Note that the resulting :c:type:`wchar_t` string might contain
|
||||
null characters, which would cause the string to be truncated when used with
|
||||
most C functions. If *size* is ``NULL`` and the :c:expr:`wchar_t*` string
|
||||
contains null characters a :exc:`ValueError` is raised.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue