mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +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
|
@ -547,7 +547,7 @@ Building values
|
|||
Same as ``s#``.
|
||||
|
||||
``u`` (:class:`str`) [const wchar_t \*]
|
||||
Convert a null-terminated :c:expr:`wchar_t` buffer of Unicode (UTF-16 or UCS-4)
|
||||
Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or UCS-4)
|
||||
data to a Python Unicode object. If the Unicode buffer pointer is ``NULL``,
|
||||
``None`` is returned.
|
||||
|
||||
|
|
|
@ -581,7 +581,7 @@ that the treatment of negative indices differs from a Python slice):
|
|||
default).
|
||||
|
||||
A serial number, incremented by 1 on each call to a malloc-like or
|
||||
realloc-like function. Big-endian ``size_t``. If "bad memory" is detected
|
||||
realloc-like function. Big-endian :c:type:`size_t`. If "bad memory" is detected
|
||||
later, the serial number gives an excellent way to set a breakpoint on the
|
||||
next run, to capture the instant at which this block was passed out. The
|
||||
static function bumpserialno() in obmalloc.c is the only place the serial
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -17,7 +17,7 @@ parameter. The available start symbols are :c:data:`Py_eval_input`,
|
|||
following the functions which accept them as parameters.
|
||||
|
||||
Note also that several of these functions take :c:expr:`FILE*` parameters. One
|
||||
particular issue which needs to be handled carefully is that the :c:expr:`FILE`
|
||||
particular issue which needs to be handled carefully is that the :c:type:`FILE`
|
||||
structure for different C libraries can be different and incompatible. Under
|
||||
Windows (at least), it is possible for dynamically linked extensions to actually
|
||||
use different libraries, so care should be taken that :c:expr:`FILE*` parameters
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue