@@ -17,8 +17,8 @@ of Unicode characters while staying memory efficient. There are special cases
17
17
for strings where all code points are below 128, 256, or 65536; otherwise, code
18
18
points must be below 1114112 (which is the full Unicode range).
19
19
20
- :c:type : `Py_UNICODE* ` and UTF-8 representations are created on demand and cached
21
- in the Unicode object. The :c:type : `Py_UNICODE* ` representation is deprecated
20
+ :c:expr : `Py_UNICODE* ` and UTF-8 representations are created on demand and cached
21
+ in the Unicode object. The :c:expr : `Py_UNICODE* ` representation is deprecated
22
22
and inefficient.
23
23
24
24
Due to the transition between the old APIs and the new APIs, Unicode objects
@@ -30,7 +30,7 @@ can internally be in two states depending on how they were created:
30
30
31
31
* "legacy" Unicode objects have been created through one of the deprecated
32
32
APIs (typically :c:func: `PyUnicode_FromUnicode `) and only bear the
33
- :c:type : `Py_UNICODE* ` representation; you will have to call
33
+ :c:expr : `Py_UNICODE* ` representation; you will have to call
34
34
:c:func: `PyUnicode_READY ` on them before calling any other API.
35
35
36
36
.. note ::
@@ -236,7 +236,7 @@ access to internal read-only data of Unicode objects:
236
236
returned buffer is always terminated with an extra null code point. It
237
237
may also contain embedded null code points, which would cause the string
238
238
to be truncated when used in most C functions. The ``AS_DATA `` form
239
- casts the pointer to :c:type : `const char * `. The *o * argument has to be
239
+ casts the pointer to :c:expr : `const char * `. The *o * argument has to be
240
240
a Unicode object (not checked).
241
241
242
242
.. versionchanged:: 3.3
@@ -714,7 +714,7 @@ Extension modules can continue using them, as they will not be removed in Python
714
714
715
715
Return a read-only pointer to the Unicode object's internal
716
716
:c:type: `Py_UNICODE ` buffer, or ``NULL `` on error. This will create the
717
- :c:type : `Py_UNICODE* ` representation of the object if it is not yet
717
+ :c:expr : `Py_UNICODE* ` representation of the object if it is not yet
718
718
available. The buffer is always terminated with an extra null code point.
719
719
Note that the resulting :c:type: `Py_UNICODE ` string may also contain
720
720
embedded null code points, which would cause the string to be truncated when
@@ -730,7 +730,7 @@ Extension modules can continue using them, as they will not be removed in Python
730
730
731
731
Like :c:func: `PyUnicode_AsUnicode `, but also saves the :c:func: `Py_UNICODE `
732
732
array length (excluding the extra null terminator) in *size*.
733
- Note that the resulting :c:type :`Py_UNICODE*` string
733
+ Note that the resulting :c:expr :`Py_UNICODE*` string
734
734
may contain embedded null code points, which would cause the string to be
735
735
truncated when used in most C functions.
736
736
0 commit comments