@@ -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 ::
@@ -235,7 +235,7 @@ access internal read-only data of Unicode objects:
235
235
returned buffer is always terminated with an extra null code point. It
236
236
may also contain embedded null code points, which would cause the string
237
237
to be truncated when used in most C functions. The ``AS_DATA `` form
238
- casts the pointer to :c:type : `const char * `. The *o * argument has to be
238
+ casts the pointer to :c:expr : `const char * `. The *o * argument has to be
239
239
a Unicode object (not checked).
240
240
241
241
.. versionchanged:: 3.3
@@ -707,7 +707,7 @@ Extension modules can continue using them, as they will not be removed in Python
707
707
708
708
Return a read-only pointer to the Unicode object's internal
709
709
:c:type: `Py_UNICODE ` buffer, or ``NULL `` on error. This will create the
710
- :c:type : `Py_UNICODE* ` representation of the object if it is not yet
710
+ :c:expr : `Py_UNICODE* ` representation of the object if it is not yet
711
711
available. The buffer is always terminated with an extra null code point.
712
712
Note that the resulting :c:type: `Py_UNICODE ` string may also contain
713
713
embedded null code points, which would cause the string to be truncated when
@@ -734,7 +734,7 @@ Extension modules can continue using them, as they will not be removed in Python
734
734
735
735
Like :c:func: `PyUnicode_AsUnicode `, but also saves the :c:func: `Py_UNICODE `
736
736
array length (excluding the extra null terminator) in *size*.
737
- Note that the resulting :c:type :`Py_UNICODE*` string
737
+ Note that the resulting :c:expr :`Py_UNICODE*` string
738
738
may contain embedded null code points, which would cause the string to be
739
739
truncated when used in most C functions.
740
740
0 commit comments