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 58a3d28

Browse filesBrowse files
CharlieZhao95erlend-aaslandJelleZijlstra
authored
gh-91755: Document Py_IncRef and Py_DecRef as C functions (#91805)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent b86d783 commit 58a3d28
Copy full SHA for 58a3d28

File tree

1 file changed

+10
-4
lines changed
Filter options

1 file changed

+10
-4
lines changed

‎Doc/c-api/refcounting.rst

Copy file name to clipboardExpand all lines: Doc/c-api/refcounting.rst
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,17 @@ objects.
109109
It is a good idea to use this macro whenever decrementing the reference
110110
count of an object that might be traversed during garbage collection.
111111
112+
.. c:function:: void Py_IncRef(PyObject *o)
113+
114+
Increment the reference count for object *o*. A function version of :c:func:`Py_XINCREF`.
115+
It can be used for runtime dynamic embedding of Python.
116+
117+
118+
.. c:function:: void Py_DecRef(PyObject *o)
119+
120+
Decrement the reference count for object *o*. A function version of :c:func:`Py_XDECREF`.
121+
It can be used for runtime dynamic embedding of Python.
112122
113-
The following functions are for runtime dynamic embedding of Python:
114-
``Py_IncRef(PyObject *o)``, ``Py_DecRef(PyObject *o)``. They are
115-
simply exported function versions of :c:func:`Py_XINCREF` and
116-
:c:func:`Py_XDECREF`, respectively.
117123
118124
The following functions or macros are only for use within the interpreter core:
119125
:c:func:`_Py_Dealloc`, :c:func:`_Py_ForgetReference`, :c:func:`_Py_NewReference`,

0 commit comments

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