File tree Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Expand file tree Collapse file tree 2 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,26 @@ The macros in this section are used for managing reference counts of Python
11
11
objects.
12
12
13
13
14
+ .. c :function :: Py_ssize_t Py_REFCNT (PyObject *o)
15
+
16
+ Get the reference count of the Python object *o *.
17
+
18
+ Use the :c:func: `Py_SET_REFCNT() ` function to set an object reference count.
19
+
20
+ .. versionchanged :: 3.11
21
+ The parameter type is no longer :c:expr: `const PyObject* `.
22
+
23
+ .. versionchanged :: 3.10
24
+ :c:func: `Py_REFCNT() ` is changed to the inline static function.
25
+
26
+
27
+ .. c :function :: void Py_SET_REFCNT (PyObject *o, Py_ssize_t refcnt)
28
+
29
+ Set the object *o * reference counter to *refcnt *.
30
+
31
+ .. versionadded :: 3.9
32
+
33
+
14
34
.. c :function :: void Py_INCREF (PyObject *o)
15
35
16
36
Increment the reference count for object *o *.
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