File tree Expand file tree Collapse file tree 2 files changed +19
-20
lines changed Expand file tree Collapse file tree 2 files changed +19
-20
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,25 @@ Reference Counting
10
10
The macros in this section are used for managing reference counts of Python
11
11
objects.
12
12
13
+ .. c :function :: Py_ssize_t Py_REFCNT (PyObject *o)
14
+
15
+ Get the reference count of the Python object *o *.
16
+
17
+ Use the :c:func: `Py_SET_REFCNT() ` function to set an object reference count.
18
+
19
+ .. versionchanged :: 3.11
20
+ The parameter type is no longer :c:expr: `const PyObject* `.
21
+
22
+ .. versionchanged :: 3.10
23
+ :c:func: `Py_REFCNT() ` is changed to the inline static function.
24
+
25
+
26
+ .. c :function :: void Py_SET_REFCNT (PyObject *o, Py_ssize_t refcnt)
27
+
28
+ Set the object *o * reference counter to *refcnt *.
29
+
30
+ .. versionadded :: 3.9
31
+
13
32
14
33
.. c :function :: void Py_INCREF (PyObject *o)
15
34
Original file line number Diff line number Diff line change @@ -121,26 +121,6 @@ the definition of all other Python objects.
121
121
.. versionadded :: 3.9
122
122
123
123
124
- .. c :function :: Py_ssize_t Py_REFCNT (PyObject *o)
125
-
126
- Get the reference count of the Python object *o *.
127
-
128
- Use the :c:func: `Py_SET_REFCNT() ` function to set an object reference count.
129
-
130
- .. versionchanged :: 3.11
131
- The parameter type is no longer :c:expr: `const PyObject* `.
132
-
133
- .. versionchanged :: 3.10
134
- :c:func: `Py_REFCNT() ` is changed to the inline static function.
135
-
136
-
137
- .. c :function :: void Py_SET_REFCNT (PyObject *o, Py_ssize_t refcnt)
138
-
139
- Set the object *o * reference counter to *refcnt *.
140
-
141
- .. versionadded :: 3.9
142
-
143
-
144
124
.. c :function :: Py_ssize_t Py_SIZE (PyVarObject *o)
145
125
146
126
Get the size of the Python object *o *.
You can’t perform that action at this time.
0 commit comments