Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ffafd31

Browse filesBrowse files
[3.11] gh-93738: Documentation C syntax (:c:type: to :c:expr:, misc. cases) (GH-97775) (#97873)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 0a20080 commit ffafd31
Copy full SHA for ffafd31

File tree

Expand file treeCollapse file tree

4 files changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+7
-7
lines changed

‎Doc/c-api/file.rst

Copy file name to clipboardExpand all lines: Doc/c-api/file.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ the :mod:`io` APIs instead.
6565
Overrides the normal behavior of :func:`io.open_code` to pass its parameter
6666
through the provided handler.
6767
68-
The handler is a function of type :c:type:`PyObject *(\*)(PyObject *path,
68+
The handler is a function of type :c:expr:`PyObject *(\*)(PyObject *path,
6969
void *userData)`, where *path* is guaranteed to be :c:type:`PyUnicodeObject`.
7070
7171
The *userData* pointer is passed into the hook function. Since hook

‎Doc/c-api/structures.rst

Copy file name to clipboardExpand all lines: Doc/c-api/structures.rst
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ the definition of all other Python objects.
103103
104104
.. versionchanged:: 3.11
105105
:c:func:`Py_TYPE()` is changed to an inline static function.
106-
The parameter type is no longer :c:type:`const PyObject*`.
106+
The parameter type is no longer :c:expr:`const PyObject*`.
107107
108108
109109
.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type)
@@ -128,7 +128,7 @@ the definition of all other Python objects.
128128
Use the :c:func:`Py_SET_REFCNT()` function to set an object reference count.
129129
130130
.. versionchanged:: 3.11
131-
The parameter type is no longer :c:type:`const PyObject*`.
131+
The parameter type is no longer :c:expr:`const PyObject*`.
132132
133133
.. versionchanged:: 3.10
134134
:c:func:`Py_REFCNT()` is changed to the inline static function.
@@ -149,7 +149,7 @@ the definition of all other Python objects.
149149
150150
.. versionchanged:: 3.11
151151
:c:func:`Py_SIZE()` is changed to an inline static function.
152-
The parameter type is no longer :c:type:`const PyVarObject*`.
152+
The parameter type is no longer :c:expr:`const PyVarObject*`.
153153
154154
155155
.. c:function:: void Py_SET_SIZE(PyVarObject *o, Py_ssize_t size)

‎Doc/whatsnew/2.4.rst

Copy file name to clipboardExpand all lines: Doc/whatsnew/2.4.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ Some of the changes to Python's build process and to the C API are:
14531453
extension functions: :c:macro:`Py_RETURN_NONE`, :c:macro:`Py_RETURN_TRUE`, and
14541454
:c:macro:`Py_RETURN_FALSE`. (Contributed by Brett Cannon.)
14551455

1456-
* Another new macro, :c:macro:`Py_CLEAR(obj)`, decreases the reference count of
1456+
* Another new macro, :c:macro:`Py_CLEAR`, decreases the reference count of
14571457
*obj* and sets *obj* to the null pointer. (Contributed by Jim Fulton.)
14581458

14591459
* A new function, ``PyTuple_Pack(N, obj1, obj2, ..., objN)``, constructs
@@ -1464,7 +1464,7 @@ Some of the changes to Python's build process and to the C API are:
14641464
lookups without masking exceptions raised during the look-up process.
14651465
(Contributed by Raymond Hettinger.)
14661466

1467-
* The :c:macro:`Py_IS_NAN(X)` macro returns 1 if its float or double argument
1467+
* The :c:expr:`Py_IS_NAN(X)` macro returns 1 if its float or double argument
14681468
*X* is a NaN. (Contributed by Tim Peters.)
14691469

14701470
* C code can avoid unnecessary locking by using the new

‎Misc/NEWS.d/3.8.0a4.rst

Copy file name to clipboardExpand all lines: Misc/NEWS.d/3.8.0a4.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ the function is called twice.
13541354
.. nonce: pz-DIR
13551355
.. section: C API
13561356
1357-
:c:macro:`PyDoc_VAR(name)` and :c:macro:`PyDoc_STRVAR(name,str)` now create
1357+
:c:expr:`PyDoc_VAR(name)` and :c:expr:`PyDoc_STRVAR(name,str)` now create
13581358
``static const char name[]`` instead of ``static char name[]``. Patch by
13591359
Inada Naoki.
13601360

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.