diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2022-10-04 23:13:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 23:13:03 (GMT) |
commit | 0bf6a617ed1832bc4803e532c8d6b3427cf48b13 (patch) | |
tree | 7fdb300225bae6bd3a2579f4b6a60a64fcf1343e /Doc/c-api/intro.rst | |
parent | 4ebb0250314b57637d213cd5bc5f5ce5dd911d94 (diff) | |
download | cpython-0bf6a617ed1832bc4803e532c8d6b3427cf48b13.zip cpython-0bf6a617ed1832bc4803e532c8d6b3427cf48b13.tar.gz cpython-0bf6a617ed1832bc4803e532c8d6b3427cf48b13.tar.bz2 |
gh-93738: Documentation C syntax (:c:type:`PyObject` -> :c:expr:`PyObject`) (#97776)
:c:type:`PyObject` -> :c:expr:`PyObject`
Diffstat (limited to 'Doc/c-api/intro.rst')
-rw-r--r-- | Doc/c-api/intro.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst index 557ccfc..991bc3b 100644 --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@ -264,13 +264,13 @@ Objects, Types and Reference Counts .. index:: object: type Most Python/C API functions have one or more arguments as well as a return value -of type :c:type:`PyObject*`. This type is a pointer to an opaque data type +of type :c:expr:`PyObject*`. This type is a pointer to an opaque data type representing an arbitrary Python object. Since all Python object types are treated the same way by the Python language in most situations (e.g., assignments, scope rules, and argument passing), it is only fitting that they should be represented by a single C type. Almost all Python objects live on the heap: you never declare an automatic or static variable of type -:c:type:`PyObject`, only pointer variables of type :c:type:`PyObject*` can be +:c:type:`PyObject`, only pointer variables of type :c:expr:`PyObject*` can be declared. The sole exception are the type objects; since these must never be deallocated, they are typically static :c:type:`PyTypeObject` objects. |