@@ -44,7 +44,7 @@ Python:
44
44
45
45
.. c :type :: Py_UNICODE
46
46
47
- This is a typedef of :c:expr : `wchar_t `, which is a 16-bit type or 32-bit type
47
+ This is a typedef of :c:type : `wchar_t `, which is a 16-bit type or 32-bit type
48
48
depending on the platform.
49
49
50
50
.. versionchanged :: 3.3
@@ -437,11 +437,11 @@ APIs:
437
437
+----------+-----------------------------------------------------+
438
438
| ``ll`` | :c:expr:`long long` or :c:expr:`unsigned long long` |
439
439
+----------+-----------------------------------------------------+
440
- | ``j`` | :c:expr :`intmax_t` or :c:expr :`uintmax_t` |
440
+ | ``j`` | :c:type :`intmax_t` or :c:type :`uintmax_t` |
441
441
+----------+-----------------------------------------------------+
442
- | ``z`` | :c:expr :`size_t` or :c:expr :`ssize_t` |
442
+ | ``z`` | :c:type :`size_t` or :c:type :`ssize_t` |
443
443
+----------+-----------------------------------------------------+
444
- | ``t`` | :c:expr :`ptrdiff_t` |
444
+ | ``t`` | :c:type :`ptrdiff_t` |
445
445
+----------+-----------------------------------------------------+
446
446
447
447
The length modifier ``l`` for following conversions ``s`` or ``V`` specify
@@ -520,7 +520,7 @@ APIs:
520
520
521
521
.. note::
522
522
The width formatter unit is number of characters rather than bytes.
523
- The precision formatter unit is number of bytes or :c:expr :`wchar_t`
523
+ The precision formatter unit is number of bytes or :c:type :`wchar_t`
524
524
items (if the length modifier ``l `` is used) for ``"%s"`` and
525
525
``"%V"`` (if the ``PyObject* `` argument is ``NULL ``), and a number of
526
526
characters for ``"%A"``, ``"%U"``, ``"%S"``, ``"%R"`` and ``"%V"``
@@ -839,21 +839,21 @@ conversion function:
839
839
wchar_t Support
840
840
"""""""""""""""
841
841
842
- :c:expr : `wchar_t ` support for platforms which support it:
842
+ :c:type : `wchar_t ` support for platforms which support it:
843
843
844
844
.. c :function :: PyObject* PyUnicode_FromWideChar (const wchar_t *w, Py_ssize_t size)
845
845
846
- Create a Unicode object from the :c:expr : `wchar_t ` buffer *w * of the given *size *.
846
+ Create a Unicode object from the :c:type : `wchar_t ` buffer *w * of the given *size *.
847
847
Passing ``-1 `` as the *size * indicates that the function must itself compute the length,
848
848
using wcslen.
849
849
Return ``NULL `` on failure.
850
850
851
851
852
852
.. c :function :: Py_ssize_t PyUnicode_AsWideChar (PyObject *unicode, wchar_t *w, Py_ssize_t size)
853
853
854
- Copy the Unicode object contents into the :c:expr : `wchar_t ` buffer *w *. At most
855
- *size * :c:expr : `wchar_t ` characters are copied (excluding a possibly trailing
856
- null termination character). Return the number of :c:expr :`wchar_t` characters
854
+ Copy the Unicode object contents into the :c:type : `wchar_t ` buffer *w *. At most
855
+ *size * :c:type : `wchar_t ` characters are copied (excluding a possibly trailing
856
+ null termination character). Return the number of :c:type :`wchar_t` characters
857
857
copied or ``-1`` in case of an error. Note that the resulting :c:expr:`wchar_t*`
858
858
string may or may not be null-terminated. It is the responsibility of the caller
859
859
to make sure that the :c:expr:`wchar_t*` string is null-terminated in case this is
@@ -867,7 +867,7 @@ wchar_t Support
867
867
Convert the Unicode object to a wide character string. The output string
868
868
always ends with a null character. If *size * is not ``NULL ``, write the number
869
869
of wide characters (excluding the trailing null termination character) into
870
- *\*size*. Note that the resulting :c:expr :`wchar_t` string might contain
870
+ *\*size*. Note that the resulting :c:type :`wchar_t` string might contain
871
871
null characters, which would cause the string to be truncated when used with
872
872
most C functions. If *size* is ``NULL`` and the :c:expr:`wchar_t*` string
873
873
contains null characters a :exc:`ValueError` is raised.
0 commit comments