/src/Python-3.8.3/Include/object.h
Line | Count | Source (jump to first uncovered line) |
1 | | #ifndef Py_OBJECT_H |
2 | | #define Py_OBJECT_H |
3 | | |
4 | | #include "pymem.h" /* _Py_tracemalloc_config */ |
5 | | |
6 | | #ifdef __cplusplus |
7 | | extern "C" { |
8 | | #endif |
9 | | |
10 | | |
11 | | /* Object and type object interface */ |
12 | | |
13 | | /* |
14 | | Objects are structures allocated on the heap. Special rules apply to |
15 | | the use of objects to ensure they are properly garbage-collected. |
16 | | Objects are never allocated statically or on the stack; they must be |
17 | | accessed through special macros and functions only. (Type objects are |
18 | | exceptions to the first rule; the standard types are represented by |
19 | | statically initialized type objects, although work on type/class unification |
20 | | for Python 2.2 made it possible to have heap-allocated type objects too). |
21 | | |
22 | | An object has a 'reference count' that is increased or decreased when a |
23 | | pointer to the object is copied or deleted; when the reference count |
24 | | reaches zero there are no references to the object left and it can be |
25 | | removed from the heap. |
26 | | |
27 | | An object has a 'type' that determines what it represents and what kind |
28 | | of data it contains. An object's type is fixed when it is created. |
29 | | Types themselves are represented as objects; an object contains a |
30 | | pointer to the corresponding type object. The type itself has a type |
31 | | pointer pointing to the object representing the type 'type', which |
32 | | contains a pointer to itself!. |
33 | | |
34 | | Objects do not float around in memory; once allocated an object keeps |
35 | | the same size and address. Objects that must hold variable-size data |
36 | | can contain pointers to variable-size parts of the object. Not all |
37 | | objects of the same type have the same size; but the size cannot change |
38 | | after allocation. (These restrictions are made so a reference to an |
39 | | object can be simply a pointer -- moving an object would require |
40 | | updating all the pointers, and changing an object's size would require |
41 | | moving it if there was another object right next to it.) |
42 | | |
43 | | Objects are always accessed through pointers of the type 'PyObject *'. |
44 | | The type 'PyObject' is a structure that only contains the reference count |
45 | | and the type pointer. The actual memory allocated for an object |
46 | | contains other data that can only be accessed after casting the pointer |
47 | | to a pointer to a longer structure type. This longer type must start |
48 | | with the reference count and type fields; the macro PyObject_HEAD should be |
49 | | used for this (to accommodate for future changes). The implementation |
50 | | of a particular object type can cast the object pointer to the proper |
51 | | type and back. |
52 | | |
53 | | A standard interface exists for objects that contain an array of items |
54 | | whose size is determined when the object is allocated. |
55 | | */ |
56 | | |
57 | | /* Py_DEBUG implies Py_REF_DEBUG. */ |
58 | | #if defined(Py_DEBUG) && !defined(Py_REF_DEBUG) |
59 | | #define Py_REF_DEBUG |
60 | | #endif |
61 | | |
62 | | #if defined(Py_LIMITED_API) && defined(Py_REF_DEBUG) |
63 | | #error Py_LIMITED_API is incompatible with Py_DEBUG, Py_TRACE_REFS, and Py_REF_DEBUG |
64 | | #endif |
65 | | |
66 | | |
67 | | #ifdef Py_TRACE_REFS |
68 | | /* Define pointers to support a doubly-linked list of all live heap objects. */ |
69 | | #define _PyObject_HEAD_EXTRA \ |
70 | | struct _object *_ob_next; \ |
71 | | struct _object *_ob_prev; |
72 | | |
73 | | #define _PyObject_EXTRA_INIT 0, 0, |
74 | | |
75 | | #else |
76 | | #define _PyObject_HEAD_EXTRA |
77 | | #define _PyObject_EXTRA_INIT |
78 | | #endif |
79 | | |
80 | | /* PyObject_HEAD defines the initial segment of every PyObject. */ |
81 | | #define PyObject_HEAD PyObject ob_base; |
82 | | |
83 | | #define PyObject_HEAD_INIT(type) \ |
84 | | { _PyObject_EXTRA_INIT \ |
85 | | 1, type }, |
86 | | |
87 | | #define PyVarObject_HEAD_INIT(type, size) \ |
88 | | { PyObject_HEAD_INIT(type) size }, |
89 | | |
90 | | /* PyObject_VAR_HEAD defines the initial segment of all variable-size |
91 | | * container objects. These end with a declaration of an array with 1 |
92 | | * element, but enough space is malloc'ed so that the array actually |
93 | | * has room for ob_size elements. Note that ob_size is an element count, |
94 | | * not necessarily a byte count. |
95 | | */ |
96 | | #define PyObject_VAR_HEAD PyVarObject ob_base; |
97 | | #define Py_INVALID_SIZE (Py_ssize_t)-1 |
98 | | |
99 | | /* Nothing is actually declared to be a PyObject, but every pointer to |
100 | | * a Python object can be cast to a PyObject*. This is inheritance built |
101 | | * by hand. Similarly every pointer to a variable-size Python object can, |
102 | | * in addition, be cast to PyVarObject*. |
103 | | */ |
104 | | typedef struct _object { |
105 | | _PyObject_HEAD_EXTRA |
106 | | Py_ssize_t ob_refcnt; |
107 | | struct _typeobject *ob_type; |
108 | | } PyObject; |
109 | | |
110 | | /* Cast argument to PyObject* type. */ |
111 | 17.4M | #define _PyObject_CAST(op) ((PyObject*)(op)) |
112 | | |
113 | | typedef struct { |
114 | | PyObject ob_base; |
115 | | Py_ssize_t ob_size; /* Number of items in variable part */ |
116 | | } PyVarObject; |
117 | | |
118 | | /* Cast argument to PyVarObject* type. */ |
119 | 1.95M | #define _PyVarObject_CAST(op) ((PyVarObject*)(op)) |
120 | | |
121 | 939k | #define Py_REFCNT(ob) (_PyObject_CAST(ob)->ob_refcnt) |
122 | 6.44M | #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) |
123 | 1.73M | #define Py_SIZE(ob) (_PyVarObject_CAST(ob)->ob_size) |
124 | | |
125 | | /* |
126 | | Type objects contain a string containing the type name (to help somewhat |
127 | | in debugging), the allocation parameters (see PyObject_New() and |
128 | | PyObject_NewVar()), |
129 | | and methods for accessing objects of the type. Methods are optional, a |
130 | | nil pointer meaning that particular kind of access is not available for |
131 | | this type. The Py_DECREF() macro uses the tp_dealloc method without |
132 | | checking for a nil pointer; it should always be implemented except if |
133 | | the implementation can guarantee that the reference count will never |
134 | | reach zero (e.g., for statically allocated type objects). |
135 | | |
136 | | NB: the methods for certain type groups are now contained in separate |
137 | | method blocks. |
138 | | */ |
139 | | |
140 | | typedef PyObject * (*unaryfunc)(PyObject *); |
141 | | typedef PyObject * (*binaryfunc)(PyObject *, PyObject *); |
142 | | typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *); |
143 | | typedef int (*inquiry)(PyObject *); |
144 | | typedef Py_ssize_t (*lenfunc)(PyObject *); |
145 | | typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t); |
146 | | typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t); |
147 | | typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *); |
148 | | typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *); |
149 | | typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *); |
150 | | |
151 | | typedef int (*objobjproc)(PyObject *, PyObject *); |
152 | | typedef int (*visitproc)(PyObject *, void *); |
153 | | typedef int (*traverseproc)(PyObject *, visitproc, void *); |
154 | | |
155 | | |
156 | | typedef void (*freefunc)(void *); |
157 | | typedef void (*destructor)(PyObject *); |
158 | | typedef PyObject *(*getattrfunc)(PyObject *, char *); |
159 | | typedef PyObject *(*getattrofunc)(PyObject *, PyObject *); |
160 | | typedef int (*setattrfunc)(PyObject *, char *, PyObject *); |
161 | | typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *); |
162 | | typedef PyObject *(*reprfunc)(PyObject *); |
163 | | typedef Py_hash_t (*hashfunc)(PyObject *); |
164 | | typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int); |
165 | | typedef PyObject *(*getiterfunc) (PyObject *); |
166 | | typedef PyObject *(*iternextfunc) (PyObject *); |
167 | | typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *); |
168 | | typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *); |
169 | | typedef int (*initproc)(PyObject *, PyObject *, PyObject *); |
170 | | typedef PyObject *(*newfunc)(struct _typeobject *, PyObject *, PyObject *); |
171 | | typedef PyObject *(*allocfunc)(struct _typeobject *, Py_ssize_t); |
172 | | |
173 | | #ifdef Py_LIMITED_API |
174 | | /* In Py_LIMITED_API, PyTypeObject is an opaque structure. */ |
175 | | typedef struct _typeobject PyTypeObject; |
176 | | #else |
177 | | /* PyTypeObject is defined in cpython/object.h */ |
178 | | #endif |
179 | | |
180 | | typedef struct{ |
181 | | int slot; /* slot id, see below */ |
182 | | void *pfunc; /* function pointer */ |
183 | | } PyType_Slot; |
184 | | |
185 | | typedef struct{ |
186 | | const char* name; |
187 | | int basicsize; |
188 | | int itemsize; |
189 | | unsigned int flags; |
190 | | PyType_Slot *slots; /* terminated by slot==0. */ |
191 | | } PyType_Spec; |
192 | | |
193 | | PyAPI_FUNC(PyObject*) PyType_FromSpec(PyType_Spec*); |
194 | | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 |
195 | | PyAPI_FUNC(PyObject*) PyType_FromSpecWithBases(PyType_Spec*, PyObject*); |
196 | | #endif |
197 | | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03040000 |
198 | | PyAPI_FUNC(void*) PyType_GetSlot(struct _typeobject*, int); |
199 | | #endif |
200 | | |
201 | | /* Generic type check */ |
202 | | PyAPI_FUNC(int) PyType_IsSubtype(struct _typeobject *, struct _typeobject *); |
203 | | #define PyObject_TypeCheck(ob, tp) \ |
204 | 47.8k | (Py_TYPE(ob) == (tp) || PyType_IsSubtype(Py_TYPE(ob), (tp))) |
205 | | |
206 | | PyAPI_DATA(struct _typeobject) PyType_Type; /* built-in 'type' */ |
207 | | PyAPI_DATA(struct _typeobject) PyBaseObject_Type; /* built-in 'object' */ |
208 | | PyAPI_DATA(struct _typeobject) PySuper_Type; /* built-in 'super' */ |
209 | | |
210 | | PyAPI_FUNC(unsigned long) PyType_GetFlags(struct _typeobject*); |
211 | | |
212 | | #define PyType_Check(op) \ |
213 | 106k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS) |
214 | 4.85k | #define PyType_CheckExact(op) (Py_TYPE(op) == &PyType_Type) |
215 | | |
216 | | PyAPI_FUNC(int) PyType_Ready(struct _typeobject *); |
217 | | PyAPI_FUNC(PyObject *) PyType_GenericAlloc(struct _typeobject *, Py_ssize_t); |
218 | | PyAPI_FUNC(PyObject *) PyType_GenericNew(struct _typeobject *, |
219 | | PyObject *, PyObject *); |
220 | | PyAPI_FUNC(unsigned int) PyType_ClearCache(void); |
221 | | PyAPI_FUNC(void) PyType_Modified(struct _typeobject *); |
222 | | |
223 | | /* Generic operations on objects */ |
224 | | PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *); |
225 | | PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *); |
226 | | PyAPI_FUNC(PyObject *) PyObject_ASCII(PyObject *); |
227 | | PyAPI_FUNC(PyObject *) PyObject_Bytes(PyObject *); |
228 | | PyAPI_FUNC(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int); |
229 | | PyAPI_FUNC(int) PyObject_RichCompareBool(PyObject *, PyObject *, int); |
230 | | PyAPI_FUNC(PyObject *) PyObject_GetAttrString(PyObject *, const char *); |
231 | | PyAPI_FUNC(int) PyObject_SetAttrString(PyObject *, const char *, PyObject *); |
232 | | PyAPI_FUNC(int) PyObject_HasAttrString(PyObject *, const char *); |
233 | | PyAPI_FUNC(PyObject *) PyObject_GetAttr(PyObject *, PyObject *); |
234 | | PyAPI_FUNC(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *); |
235 | | PyAPI_FUNC(int) PyObject_HasAttr(PyObject *, PyObject *); |
236 | | PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *); |
237 | | PyAPI_FUNC(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *); |
238 | | PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *, |
239 | | PyObject *, PyObject *); |
240 | | #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000 |
241 | | PyAPI_FUNC(int) PyObject_GenericSetDict(PyObject *, PyObject *, void *); |
242 | | #endif |
243 | | PyAPI_FUNC(Py_hash_t) PyObject_Hash(PyObject *); |
244 | | PyAPI_FUNC(Py_hash_t) PyObject_HashNotImplemented(PyObject *); |
245 | | PyAPI_FUNC(int) PyObject_IsTrue(PyObject *); |
246 | | PyAPI_FUNC(int) PyObject_Not(PyObject *); |
247 | | PyAPI_FUNC(int) PyCallable_Check(PyObject *); |
248 | | PyAPI_FUNC(void) PyObject_ClearWeakRefs(PyObject *); |
249 | | |
250 | | /* PyObject_Dir(obj) acts like Python builtins.dir(obj), returning a |
251 | | list of strings. PyObject_Dir(NULL) is like builtins.dir(), |
252 | | returning the names of the current locals. In this case, if there are |
253 | | no current locals, NULL is returned, and PyErr_Occurred() is false. |
254 | | */ |
255 | | PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *); |
256 | | |
257 | | |
258 | | /* Helpers for printing recursive container types */ |
259 | | PyAPI_FUNC(int) Py_ReprEnter(PyObject *); |
260 | | PyAPI_FUNC(void) Py_ReprLeave(PyObject *); |
261 | | |
262 | | /* Flag bits for printing: */ |
263 | 224 | #define Py_PRINT_RAW 1 /* No string quotes etc. */ |
264 | | |
265 | | /* |
266 | | Type flags (tp_flags) |
267 | | |
268 | | These flags are used to change expected features and behavior for a |
269 | | particular type. |
270 | | |
271 | | Arbitration of the flag bit positions will need to be coordinated among |
272 | | all extension writers who publicly release their extensions (this will |
273 | | be fewer than you might expect!). |
274 | | |
275 | | Most flags were removed as of Python 3.0 to make room for new flags. (Some |
276 | | flags are not for backwards compatibility but to indicate the presence of an |
277 | | optional feature; these flags remain of course.) |
278 | | |
279 | | Type definitions should use Py_TPFLAGS_DEFAULT for their tp_flags value. |
280 | | |
281 | | Code can use PyType_HasFeature(type_ob, flag_value) to test whether the |
282 | | given type object has a specified feature. |
283 | | */ |
284 | | |
285 | | /* Set if the type object is dynamically allocated */ |
286 | 824k | #define Py_TPFLAGS_HEAPTYPE (1UL << 9) |
287 | | |
288 | | /* Set if the type allows subclassing */ |
289 | 4.80k | #define Py_TPFLAGS_BASETYPE (1UL << 10) |
290 | | |
291 | | /* Set if the type implements the vectorcall protocol (PEP 590) */ |
292 | | #ifndef Py_LIMITED_API |
293 | 13.4k | #define _Py_TPFLAGS_HAVE_VECTORCALL (1UL << 11) |
294 | | #endif |
295 | | |
296 | | /* Set if the type is 'ready' -- fully initialized */ |
297 | 9.62k | #define Py_TPFLAGS_READY (1UL << 12) |
298 | | |
299 | | /* Set while the type is being 'readied', to prevent recursive ready calls */ |
300 | 8.53k | #define Py_TPFLAGS_READYING (1UL << 13) |
301 | | |
302 | | /* Objects support garbage collection (see objimpl.h) */ |
303 | 33.7k | #define Py_TPFLAGS_HAVE_GC (1UL << 14) |
304 | | |
305 | | /* These two bits are preserved for Stackless Python, next after this is 17 */ |
306 | | #ifdef STACKLESS |
307 | | #define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION (3UL << 15) |
308 | | #else |
309 | 1.58k | #define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION 0 |
310 | | #endif |
311 | | |
312 | | /* Objects behave like an unbound method */ |
313 | 4.25k | #define Py_TPFLAGS_METHOD_DESCRIPTOR (1UL << 17) |
314 | | |
315 | | /* Objects support type attribute cache */ |
316 | 1.58k | #define Py_TPFLAGS_HAVE_VERSION_TAG (1UL << 18) |
317 | 1.93k | #define Py_TPFLAGS_VALID_VERSION_TAG (1UL << 19) |
318 | | |
319 | | /* Type is abstract and cannot be instantiated */ |
320 | 3.34k | #define Py_TPFLAGS_IS_ABSTRACT (1UL << 20) |
321 | | |
322 | | /* These flags are used to determine if a type is a subclass. */ |
323 | 18 | #define Py_TPFLAGS_LONG_SUBCLASS (1UL << 24) |
324 | 2 | #define Py_TPFLAGS_LIST_SUBCLASS (1UL << 25) |
325 | 255 | #define Py_TPFLAGS_TUPLE_SUBCLASS (1UL << 26) |
326 | 0 | #define Py_TPFLAGS_BYTES_SUBCLASS (1UL << 27) |
327 | 0 | #define Py_TPFLAGS_UNICODE_SUBCLASS (1UL << 28) |
328 | 18 | #define Py_TPFLAGS_DICT_SUBCLASS (1UL << 29) |
329 | 945 | #define Py_TPFLAGS_BASE_EXC_SUBCLASS (1UL << 30) |
330 | 16 | #define Py_TPFLAGS_TYPE_SUBCLASS (1UL << 31) |
331 | | |
332 | 1.58k | #define Py_TPFLAGS_DEFAULT ( \ |
333 | 1.58k | Py_TPFLAGS_HAVE_STACKLESS_EXTENSION | \ |
334 | 1.58k | Py_TPFLAGS_HAVE_VERSION_TAG | \ |
335 | 1.58k | 0) |
336 | | |
337 | | /* NOTE: The following flags reuse lower bits (removed as part of the |
338 | | * Python 3.0 transition). */ |
339 | | |
340 | | /* The following flag is kept for compatibility. Starting with 3.8, |
341 | | * binary compatibility of C extensions accross feature releases of |
342 | | * Python is not supported anymore, except when using the stable ABI. |
343 | | */ |
344 | | |
345 | | /* Type structure has tp_finalize member (3.4) */ |
346 | | #define Py_TPFLAGS_HAVE_FINALIZE (1UL << 0) |
347 | | |
348 | | #ifdef Py_LIMITED_API |
349 | | # define PyType_HasFeature(t,f) ((PyType_GetFlags(t) & (f)) != 0) |
350 | | #endif |
351 | 2.48M | #define PyType_FastSubclass(t,f) PyType_HasFeature(t,f) |
352 | | |
353 | | |
354 | | /* |
355 | | The macros Py_INCREF(op) and Py_DECREF(op) are used to increment or decrement |
356 | | reference counts. Py_DECREF calls the object's deallocator function when |
357 | | the refcount falls to 0; for |
358 | | objects that don't contain references to other objects or heap memory |
359 | | this can be the standard function free(). Both macros can be used |
360 | | wherever a void expression is allowed. The argument must not be a |
361 | | NULL pointer. If it may be NULL, use Py_XINCREF/Py_XDECREF instead. |
362 | | The macro _Py_NewReference(op) initialize reference counts to 1, and |
363 | | in special builds (Py_REF_DEBUG, Py_TRACE_REFS) performs additional |
364 | | bookkeeping appropriate to the special build. |
365 | | |
366 | | We assume that the reference count field can never overflow; this can |
367 | | be proven when the size of the field is the same as the pointer size, so |
368 | | we ignore the possibility. Provided a C int is at least 32 bits (which |
369 | | is implicitly assumed in many parts of this code), that's enough for |
370 | | about 2**31 references to an object. |
371 | | |
372 | | XXX The following became out of date in Python 2.2, but I'm not sure |
373 | | XXX what the full truth is now. Certainly, heap-allocated type objects |
374 | | XXX can and should be deallocated. |
375 | | Type objects should never be deallocated; the type pointer in an object |
376 | | is not considered to be a reference to the type object, to save |
377 | | complications in the deallocation function. (This is actually a |
378 | | decision that's up to the implementer of each new type so if you want, |
379 | | you can count such references to the type object.) |
380 | | */ |
381 | | |
382 | | /* First define a pile of simple helper macros, one set per special |
383 | | * build symbol. These either expand to the obvious things, or to |
384 | | * nothing at all when the special mode isn't in effect. The main |
385 | | * macros can later be defined just once then, yet expand to different |
386 | | * things depending on which special build options are and aren't in effect. |
387 | | * Trust me <wink>: while painful, this is 20x easier to understand than, |
388 | | * e.g, defining _Py_NewReference five different times in a maze of nested |
389 | | * #ifdefs (we used to do that -- it was impenetrable). |
390 | | */ |
391 | | #ifdef Py_REF_DEBUG |
392 | | PyAPI_DATA(Py_ssize_t) _Py_RefTotal; |
393 | | PyAPI_FUNC(void) _Py_NegativeRefcount(const char *filename, int lineno, |
394 | | PyObject *op); |
395 | | PyAPI_FUNC(Py_ssize_t) _Py_GetRefTotal(void); |
396 | | #define _Py_INC_REFTOTAL _Py_RefTotal++ |
397 | | #define _Py_DEC_REFTOTAL _Py_RefTotal-- |
398 | | |
399 | | /* Py_REF_DEBUG also controls the display of refcounts and memory block |
400 | | * allocations at the interactive prompt and at interpreter shutdown |
401 | | */ |
402 | | PyAPI_FUNC(void) _PyDebug_PrintTotalRefs(void); |
403 | | #else |
404 | | #define _Py_INC_REFTOTAL |
405 | | #define _Py_DEC_REFTOTAL |
406 | | #endif /* Py_REF_DEBUG */ |
407 | | |
408 | | #ifdef COUNT_ALLOCS |
409 | | PyAPI_FUNC(void) _Py_inc_count(struct _typeobject *); |
410 | | PyAPI_FUNC(void) _Py_dec_count(struct _typeobject *); |
411 | | #define _Py_INC_TPALLOCS(OP) _Py_inc_count(Py_TYPE(OP)) |
412 | | #define _Py_INC_TPFREES(OP) _Py_dec_count(Py_TYPE(OP)) |
413 | | #define _Py_DEC_TPFREES(OP) Py_TYPE(OP)->tp_frees-- |
414 | | #define _Py_COUNT_ALLOCS_COMMA , |
415 | | #else |
416 | | #define _Py_INC_TPALLOCS(OP) |
417 | | #define _Py_INC_TPFREES(OP) |
418 | | #define _Py_DEC_TPFREES(OP) |
419 | | #define _Py_COUNT_ALLOCS_COMMA |
420 | | #endif /* COUNT_ALLOCS */ |
421 | | |
422 | | /* Update the Python traceback of an object. This function must be called |
423 | | when a memory block is reused from a free list. */ |
424 | | PyAPI_FUNC(int) _PyTraceMalloc_NewReference(PyObject *op); |
425 | | |
426 | | #ifdef Py_TRACE_REFS |
427 | | /* Py_TRACE_REFS is such major surgery that we call external routines. */ |
428 | | PyAPI_FUNC(void) _Py_NewReference(PyObject *); |
429 | | PyAPI_FUNC(void) _Py_ForgetReference(PyObject *); |
430 | | PyAPI_FUNC(void) _Py_PrintReferences(FILE *); |
431 | | PyAPI_FUNC(void) _Py_PrintReferenceAddresses(FILE *); |
432 | | PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force); |
433 | | #else |
434 | | /* Without Py_TRACE_REFS, there's little enough to do that we expand code |
435 | | inline. */ |
436 | | static inline void _Py_NewReference(PyObject *op) |
437 | 745k | { |
438 | 745k | if (_Py_tracemalloc_config.tracing) { |
439 | 0 | _PyTraceMalloc_NewReference(op); |
440 | 0 | } |
441 | 745k | _Py_INC_TPALLOCS(op); |
442 | 745k | _Py_INC_REFTOTAL; |
443 | 745k | Py_REFCNT(op) = 1; |
444 | 745k | } Unexecuted instantiation: abstract.c:_Py_NewReference Unexecuted instantiation: boolobject.c:_Py_NewReference Unexecuted instantiation: bytearrayobject.c:_Py_NewReference bytesobject.c:_Py_NewReference Line | Count | Source | 437 | 171k | { | 438 | 171k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 171k | _Py_INC_TPALLOCS(op); | 442 | 171k | _Py_INC_REFTOTAL; | 443 | 171k | Py_REFCNT(op) = 1; | 444 | 171k | } |
Unexecuted instantiation: call.c:_Py_NewReference Unexecuted instantiation: capsule.c:_Py_NewReference Unexecuted instantiation: exceptions.c:_Py_NewReference floatobject.c:_Py_NewReference Line | Count | Source | 437 | 2.69k | { | 438 | 2.69k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 2.69k | _Py_INC_TPALLOCS(op); | 442 | 2.69k | _Py_INC_REFTOTAL; | 443 | 2.69k | Py_REFCNT(op) = 1; | 444 | 2.69k | } |
frameobject.c:_Py_NewReference Line | Count | Source | 437 | 35.7k | { | 438 | 35.7k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 35.7k | _Py_INC_TPALLOCS(op); | 442 | 35.7k | _Py_INC_REFTOTAL; | 443 | 35.7k | Py_REFCNT(op) = 1; | 444 | 35.7k | } |
Unexecuted instantiation: funcobject.c:_Py_NewReference Unexecuted instantiation: iterobject.c:_Py_NewReference listobject.c:_Py_NewReference Line | Count | Source | 437 | 6.15k | { | 438 | 6.15k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 6.15k | _Py_INC_TPALLOCS(op); | 442 | 6.15k | _Py_INC_REFTOTAL; | 443 | 6.15k | Py_REFCNT(op) = 1; | 444 | 6.15k | } |
longobject.c:_Py_NewReference Line | Count | Source | 437 | 32.1k | { | 438 | 32.1k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 32.1k | _Py_INC_TPALLOCS(op); | 442 | 32.1k | _Py_INC_REFTOTAL; | 443 | 32.1k | Py_REFCNT(op) = 1; | 444 | 32.1k | } |
dictobject.c:_Py_NewReference Line | Count | Source | 437 | 11.4k | { | 438 | 11.4k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 11.4k | _Py_INC_TPALLOCS(op); | 442 | 11.4k | _Py_INC_REFTOTAL; | 443 | 11.4k | Py_REFCNT(op) = 1; | 444 | 11.4k | } |
Unexecuted instantiation: memoryobject.c:_Py_NewReference methodobject.c:_Py_NewReference Line | Count | Source | 437 | 8.84k | { | 438 | 8.84k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 8.84k | _Py_INC_TPALLOCS(op); | 442 | 8.84k | _Py_INC_REFTOTAL; | 443 | 8.84k | Py_REFCNT(op) = 1; | 444 | 8.84k | } |
Unexecuted instantiation: moduleobject.c:_Py_NewReference object.c:_Py_NewReference Line | Count | Source | 437 | 138k | { | 438 | 138k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 138k | _Py_INC_TPALLOCS(op); | 442 | 138k | _Py_INC_REFTOTAL; | 443 | 138k | Py_REFCNT(op) = 1; | 444 | 138k | } |
Unexecuted instantiation: obmalloc.c:_Py_NewReference Unexecuted instantiation: picklebufobject.c:_Py_NewReference Unexecuted instantiation: rangeobject.c:_Py_NewReference Unexecuted instantiation: setobject.c:_Py_NewReference sliceobject.c:_Py_NewReference Line | Count | Source | 437 | 2.35k | { | 438 | 2.35k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 2.35k | _Py_INC_TPALLOCS(op); | 442 | 2.35k | _Py_INC_REFTOTAL; | 443 | 2.35k | Py_REFCNT(op) = 1; | 444 | 2.35k | } |
Unexecuted instantiation: structseq.c:_Py_NewReference tupleobject.c:_Py_NewReference Line | Count | Source | 437 | 46.3k | { | 438 | 46.3k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 46.3k | _Py_INC_TPALLOCS(op); | 442 | 46.3k | _Py_INC_REFTOTAL; | 443 | 46.3k | Py_REFCNT(op) = 1; | 444 | 46.3k | } |
typeobject.c:_Py_NewReference Line | Count | Source | 437 | 43.7k | { | 438 | 43.7k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 43.7k | _Py_INC_TPALLOCS(op); | 442 | 43.7k | _Py_INC_REFTOTAL; | 443 | 43.7k | Py_REFCNT(op) = 1; | 444 | 43.7k | } |
unicodeobject.c:_Py_NewReference Line | Count | Source | 437 | 150k | { | 438 | 150k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 150k | _Py_INC_TPALLOCS(op); | 442 | 150k | _Py_INC_REFTOTAL; | 443 | 150k | Py_REFCNT(op) = 1; | 444 | 150k | } |
Unexecuted instantiation: unicodectype.c:_Py_NewReference Unexecuted instantiation: weakrefobject.c:_Py_NewReference Unexecuted instantiation: _warnings.c:_Py_NewReference Unexecuted instantiation: ceval.c:_Py_NewReference Unexecuted instantiation: codecs.c:_Py_NewReference Unexecuted instantiation: compile.c:_Py_NewReference Unexecuted instantiation: errors.c:_Py_NewReference Unexecuted instantiation: future.c:_Py_NewReference Unexecuted instantiation: getargs.c:_Py_NewReference Unexecuted instantiation: getversion.c:_Py_NewReference Unexecuted instantiation: import.c:_Py_NewReference Unexecuted instantiation: importdl.c:_Py_NewReference Unexecuted instantiation: initconfig.c:_Py_NewReference Unexecuted instantiation: marshal.c:_Py_NewReference Unexecuted instantiation: modsupport.c:_Py_NewReference Unexecuted instantiation: mysnprintf.c:_Py_NewReference Unexecuted instantiation: pathconfig.c:_Py_NewReference Unexecuted instantiation: peephole.c:_Py_NewReference Unexecuted instantiation: preconfig.c:_Py_NewReference Unexecuted instantiation: pyarena.c:_Py_NewReference Unexecuted instantiation: pyctype.c:_Py_NewReference Unexecuted instantiation: pyhash.c:_Py_NewReference Unexecuted instantiation: pylifecycle.c:_Py_NewReference Unexecuted instantiation: pymath.c:_Py_NewReference Unexecuted instantiation: pystate.c:_Py_NewReference Unexecuted instantiation: pythonrun.c:_Py_NewReference Unexecuted instantiation: pytime.c:_Py_NewReference Unexecuted instantiation: bootstrap_hash.c:_Py_NewReference Unexecuted instantiation: symtable.c:_Py_NewReference Unexecuted instantiation: sysmodule.c:_Py_NewReference Unexecuted instantiation: thread.c:_Py_NewReference Unexecuted instantiation: traceback.c:_Py_NewReference Unexecuted instantiation: getopt.c:_Py_NewReference Unexecuted instantiation: pystrcmp.c:_Py_NewReference Unexecuted instantiation: pystrtod.c:_Py_NewReference Unexecuted instantiation: pystrhex.c:_Py_NewReference Unexecuted instantiation: dtoa.c:_Py_NewReference Unexecuted instantiation: formatter_unicode.c:_Py_NewReference Unexecuted instantiation: fileutils.c:_Py_NewReference Unexecuted instantiation: dynload_shlib.c:_Py_NewReference Unexecuted instantiation: config.c:_Py_NewReference Unexecuted instantiation: getpath.c:_Py_NewReference gcmodule.c:_Py_NewReference Line | Count | Source | 437 | 88.3k | { | 438 | 88.3k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 88.3k | _Py_INC_TPALLOCS(op); | 442 | 88.3k | _Py_INC_REFTOTAL; | 443 | 88.3k | Py_REFCNT(op) = 1; | 444 | 88.3k | } |
Unexecuted instantiation: posixmodule.c:_Py_NewReference Unexecuted instantiation: errnomodule.c:_Py_NewReference Unexecuted instantiation: pwdmodule.c:_Py_NewReference Unexecuted instantiation: _sre.c:_Py_NewReference Unexecuted instantiation: _codecsmodule.c:_Py_NewReference Unexecuted instantiation: _weakref.c:_Py_NewReference Unexecuted instantiation: _functoolsmodule.c:_Py_NewReference Unexecuted instantiation: _operator.c:_Py_NewReference Unexecuted instantiation: _collectionsmodule.c:_Py_NewReference Unexecuted instantiation: _abc.c:_Py_NewReference Unexecuted instantiation: itertoolsmodule.c:_Py_NewReference Unexecuted instantiation: atexitmodule.c:_Py_NewReference Unexecuted instantiation: signalmodule.c:_Py_NewReference Unexecuted instantiation: _stat.c:_Py_NewReference Unexecuted instantiation: timemodule.c:_Py_NewReference Unexecuted instantiation: _threadmodule.c:_Py_NewReference Unexecuted instantiation: _localemodule.c:_Py_NewReference Unexecuted instantiation: _iomodule.c:_Py_NewReference Unexecuted instantiation: iobase.c:_Py_NewReference Unexecuted instantiation: fileio.c:_Py_NewReference Unexecuted instantiation: bytesio.c:_Py_NewReference Unexecuted instantiation: bufferedio.c:_Py_NewReference Unexecuted instantiation: textio.c:_Py_NewReference Unexecuted instantiation: stringio.c:_Py_NewReference Unexecuted instantiation: faulthandler.c:_Py_NewReference Unexecuted instantiation: _tracemalloc.c:_Py_NewReference Unexecuted instantiation: hashtable.c:_Py_NewReference Unexecuted instantiation: symtablemodule.c:_Py_NewReference Unexecuted instantiation: xxsubtype.c:_Py_NewReference Unexecuted instantiation: frozen.c:_Py_NewReference Unexecuted instantiation: getbuildinfo.c:_Py_NewReference Unexecuted instantiation: acceler.c:_Py_NewReference Unexecuted instantiation: grammar1.c:_Py_NewReference Unexecuted instantiation: node.c:_Py_NewReference Unexecuted instantiation: token.c:_Py_NewReference Unexecuted instantiation: parsetok.c:_Py_NewReference Unexecuted instantiation: tokenizer.c:_Py_NewReference Unexecuted instantiation: accu.c:_Py_NewReference Unexecuted instantiation: bytes_methods.c:_Py_NewReference Unexecuted instantiation: cellobject.c:_Py_NewReference classobject.c:_Py_NewReference Line | Count | Source | 437 | 7.91k | { | 438 | 7.91k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 7.91k | _Py_INC_TPALLOCS(op); | 442 | 7.91k | _Py_INC_REFTOTAL; | 443 | 7.91k | Py_REFCNT(op) = 1; | 444 | 7.91k | } |
Unexecuted instantiation: codeobject.c:_Py_NewReference Unexecuted instantiation: complexobject.c:_Py_NewReference Unexecuted instantiation: descrobject.c:_Py_NewReference Unexecuted instantiation: enumobject.c:_Py_NewReference Unexecuted instantiation: genobject.c:_Py_NewReference Unexecuted instantiation: fileobject.c:_Py_NewReference Unexecuted instantiation: interpreteridobject.c:_Py_NewReference Unexecuted instantiation: odictobject.c:_Py_NewReference Unexecuted instantiation: namespaceobject.c:_Py_NewReference Unexecuted instantiation: Python-ast.c:_Py_NewReference Unexecuted instantiation: asdl.c:_Py_NewReference Unexecuted instantiation: ast.c:_Py_NewReference Unexecuted instantiation: ast_opt.c:_Py_NewReference Unexecuted instantiation: ast_unparse.c:_Py_NewReference Unexecuted instantiation: bltinmodule.c:_Py_NewReference Unexecuted instantiation: context.c:_Py_NewReference Unexecuted instantiation: getcompiler.c:_Py_NewReference Unexecuted instantiation: getcopyright.c:_Py_NewReference Unexecuted instantiation: getplatform.c:_Py_NewReference Unexecuted instantiation: hamt.c:_Py_NewReference Unexecuted instantiation: mystrtoul.c:_Py_NewReference Unexecuted instantiation: structmember.c:_Py_NewReference Unexecuted instantiation: parser.c:_Py_NewReference Unexecuted instantiation: myreadline.c:_Py_NewReference |
445 | | |
446 | | static inline void _Py_ForgetReference(PyObject *op) |
447 | 6.72k | { |
448 | 6.72k | (void)op; /* may be unused, shut up -Wunused-parameter */ |
449 | 6.72k | _Py_INC_TPFREES(op); |
450 | 6.72k | } Unexecuted instantiation: abstract.c:_Py_ForgetReference Unexecuted instantiation: boolobject.c:_Py_ForgetReference Unexecuted instantiation: bytearrayobject.c:_Py_ForgetReference bytesobject.c:_Py_ForgetReference Line | Count | Source | 447 | 294 | { | 448 | 294 | (void)op; /* may be unused, shut up -Wunused-parameter */ | 449 | 294 | _Py_INC_TPFREES(op); | 450 | 294 | } |
Unexecuted instantiation: call.c:_Py_ForgetReference Unexecuted instantiation: capsule.c:_Py_ForgetReference Unexecuted instantiation: exceptions.c:_Py_ForgetReference Unexecuted instantiation: floatobject.c:_Py_ForgetReference Unexecuted instantiation: frameobject.c:_Py_ForgetReference Unexecuted instantiation: funcobject.c:_Py_ForgetReference Unexecuted instantiation: iterobject.c:_Py_ForgetReference Unexecuted instantiation: listobject.c:_Py_ForgetReference Unexecuted instantiation: longobject.c:_Py_ForgetReference Unexecuted instantiation: dictobject.c:_Py_ForgetReference Unexecuted instantiation: memoryobject.c:_Py_ForgetReference Unexecuted instantiation: methodobject.c:_Py_ForgetReference Unexecuted instantiation: moduleobject.c:_Py_ForgetReference Unexecuted instantiation: object.c:_Py_ForgetReference Unexecuted instantiation: obmalloc.c:_Py_ForgetReference Unexecuted instantiation: picklebufobject.c:_Py_ForgetReference Unexecuted instantiation: rangeobject.c:_Py_ForgetReference Unexecuted instantiation: setobject.c:_Py_ForgetReference Unexecuted instantiation: sliceobject.c:_Py_ForgetReference Unexecuted instantiation: structseq.c:_Py_ForgetReference tupleobject.c:_Py_ForgetReference Line | Count | Source | 447 | 39 | { | 448 | 39 | (void)op; /* may be unused, shut up -Wunused-parameter */ | 449 | 39 | _Py_INC_TPFREES(op); | 450 | 39 | } |
Unexecuted instantiation: typeobject.c:_Py_ForgetReference unicodeobject.c:_Py_ForgetReference Line | Count | Source | 447 | 6.39k | { | 448 | 6.39k | (void)op; /* may be unused, shut up -Wunused-parameter */ | 449 | 6.39k | _Py_INC_TPFREES(op); | 450 | 6.39k | } |
Unexecuted instantiation: unicodectype.c:_Py_ForgetReference Unexecuted instantiation: weakrefobject.c:_Py_ForgetReference Unexecuted instantiation: _warnings.c:_Py_ForgetReference Unexecuted instantiation: ceval.c:_Py_ForgetReference Unexecuted instantiation: codecs.c:_Py_ForgetReference Unexecuted instantiation: compile.c:_Py_ForgetReference Unexecuted instantiation: errors.c:_Py_ForgetReference Unexecuted instantiation: future.c:_Py_ForgetReference Unexecuted instantiation: getargs.c:_Py_ForgetReference Unexecuted instantiation: getversion.c:_Py_ForgetReference Unexecuted instantiation: import.c:_Py_ForgetReference Unexecuted instantiation: importdl.c:_Py_ForgetReference Unexecuted instantiation: initconfig.c:_Py_ForgetReference Unexecuted instantiation: marshal.c:_Py_ForgetReference Unexecuted instantiation: modsupport.c:_Py_ForgetReference Unexecuted instantiation: mysnprintf.c:_Py_ForgetReference Unexecuted instantiation: pathconfig.c:_Py_ForgetReference Unexecuted instantiation: peephole.c:_Py_ForgetReference Unexecuted instantiation: preconfig.c:_Py_ForgetReference Unexecuted instantiation: pyarena.c:_Py_ForgetReference Unexecuted instantiation: pyctype.c:_Py_ForgetReference Unexecuted instantiation: pyhash.c:_Py_ForgetReference Unexecuted instantiation: pylifecycle.c:_Py_ForgetReference Unexecuted instantiation: pymath.c:_Py_ForgetReference Unexecuted instantiation: pystate.c:_Py_ForgetReference Unexecuted instantiation: pythonrun.c:_Py_ForgetReference Unexecuted instantiation: pytime.c:_Py_ForgetReference Unexecuted instantiation: bootstrap_hash.c:_Py_ForgetReference Unexecuted instantiation: symtable.c:_Py_ForgetReference Unexecuted instantiation: sysmodule.c:_Py_ForgetReference Unexecuted instantiation: thread.c:_Py_ForgetReference Unexecuted instantiation: traceback.c:_Py_ForgetReference Unexecuted instantiation: getopt.c:_Py_ForgetReference Unexecuted instantiation: pystrcmp.c:_Py_ForgetReference Unexecuted instantiation: pystrtod.c:_Py_ForgetReference Unexecuted instantiation: pystrhex.c:_Py_ForgetReference Unexecuted instantiation: dtoa.c:_Py_ForgetReference Unexecuted instantiation: formatter_unicode.c:_Py_ForgetReference Unexecuted instantiation: fileutils.c:_Py_ForgetReference Unexecuted instantiation: dynload_shlib.c:_Py_ForgetReference Unexecuted instantiation: config.c:_Py_ForgetReference Unexecuted instantiation: getpath.c:_Py_ForgetReference Unexecuted instantiation: gcmodule.c:_Py_ForgetReference Unexecuted instantiation: posixmodule.c:_Py_ForgetReference Unexecuted instantiation: errnomodule.c:_Py_ForgetReference Unexecuted instantiation: pwdmodule.c:_Py_ForgetReference Unexecuted instantiation: _sre.c:_Py_ForgetReference Unexecuted instantiation: _codecsmodule.c:_Py_ForgetReference Unexecuted instantiation: _weakref.c:_Py_ForgetReference Unexecuted instantiation: _functoolsmodule.c:_Py_ForgetReference Unexecuted instantiation: _operator.c:_Py_ForgetReference Unexecuted instantiation: _collectionsmodule.c:_Py_ForgetReference Unexecuted instantiation: _abc.c:_Py_ForgetReference Unexecuted instantiation: itertoolsmodule.c:_Py_ForgetReference Unexecuted instantiation: atexitmodule.c:_Py_ForgetReference Unexecuted instantiation: signalmodule.c:_Py_ForgetReference Unexecuted instantiation: _stat.c:_Py_ForgetReference Unexecuted instantiation: timemodule.c:_Py_ForgetReference Unexecuted instantiation: _threadmodule.c:_Py_ForgetReference Unexecuted instantiation: _localemodule.c:_Py_ForgetReference Unexecuted instantiation: _iomodule.c:_Py_ForgetReference Unexecuted instantiation: iobase.c:_Py_ForgetReference Unexecuted instantiation: fileio.c:_Py_ForgetReference Unexecuted instantiation: bytesio.c:_Py_ForgetReference Unexecuted instantiation: bufferedio.c:_Py_ForgetReference Unexecuted instantiation: textio.c:_Py_ForgetReference Unexecuted instantiation: stringio.c:_Py_ForgetReference Unexecuted instantiation: faulthandler.c:_Py_ForgetReference Unexecuted instantiation: _tracemalloc.c:_Py_ForgetReference Unexecuted instantiation: hashtable.c:_Py_ForgetReference Unexecuted instantiation: symtablemodule.c:_Py_ForgetReference Unexecuted instantiation: xxsubtype.c:_Py_ForgetReference Unexecuted instantiation: frozen.c:_Py_ForgetReference Unexecuted instantiation: getbuildinfo.c:_Py_ForgetReference Unexecuted instantiation: acceler.c:_Py_ForgetReference Unexecuted instantiation: grammar1.c:_Py_ForgetReference Unexecuted instantiation: node.c:_Py_ForgetReference Unexecuted instantiation: token.c:_Py_ForgetReference Unexecuted instantiation: parsetok.c:_Py_ForgetReference Unexecuted instantiation: tokenizer.c:_Py_ForgetReference Unexecuted instantiation: accu.c:_Py_ForgetReference Unexecuted instantiation: bytes_methods.c:_Py_ForgetReference Unexecuted instantiation: cellobject.c:_Py_ForgetReference Unexecuted instantiation: classobject.c:_Py_ForgetReference Unexecuted instantiation: codeobject.c:_Py_ForgetReference Unexecuted instantiation: complexobject.c:_Py_ForgetReference Unexecuted instantiation: descrobject.c:_Py_ForgetReference Unexecuted instantiation: enumobject.c:_Py_ForgetReference Unexecuted instantiation: genobject.c:_Py_ForgetReference Unexecuted instantiation: fileobject.c:_Py_ForgetReference Unexecuted instantiation: interpreteridobject.c:_Py_ForgetReference Unexecuted instantiation: odictobject.c:_Py_ForgetReference Unexecuted instantiation: namespaceobject.c:_Py_ForgetReference Unexecuted instantiation: Python-ast.c:_Py_ForgetReference Unexecuted instantiation: asdl.c:_Py_ForgetReference Unexecuted instantiation: ast.c:_Py_ForgetReference Unexecuted instantiation: ast_opt.c:_Py_ForgetReference Unexecuted instantiation: ast_unparse.c:_Py_ForgetReference Unexecuted instantiation: bltinmodule.c:_Py_ForgetReference Unexecuted instantiation: context.c:_Py_ForgetReference Unexecuted instantiation: getcompiler.c:_Py_ForgetReference Unexecuted instantiation: getcopyright.c:_Py_ForgetReference Unexecuted instantiation: getplatform.c:_Py_ForgetReference Unexecuted instantiation: hamt.c:_Py_ForgetReference Unexecuted instantiation: mystrtoul.c:_Py_ForgetReference Unexecuted instantiation: structmember.c:_Py_ForgetReference Unexecuted instantiation: parser.c:_Py_ForgetReference Unexecuted instantiation: myreadline.c:_Py_ForgetReference |
451 | | #endif /* !Py_TRACE_REFS */ |
452 | | |
453 | | |
454 | | PyAPI_FUNC(void) _Py_Dealloc(PyObject *); |
455 | | |
456 | | static inline void _Py_INCREF(PyObject *op) |
457 | 3.29M | { |
458 | 3.29M | _Py_INC_REFTOTAL; |
459 | 3.29M | op->ob_refcnt++; |
460 | 3.29M | } Line | Count | Source | 457 | 29.7k | { | 458 | 29.7k | _Py_INC_REFTOTAL; | 459 | 29.7k | op->ob_refcnt++; | 460 | 29.7k | } |
Line | Count | Source | 457 | 121k | { | 458 | 121k | _Py_INC_REFTOTAL; | 459 | 121k | op->ob_refcnt++; | 460 | 121k | } |
bytearrayobject.c:_Py_INCREF Line | Count | Source | 457 | 22 | { | 458 | 22 | _Py_INC_REFTOTAL; | 459 | 22 | op->ob_refcnt++; | 460 | 22 | } |
Line | Count | Source | 457 | 68.2k | { | 458 | 68.2k | _Py_INC_REFTOTAL; | 459 | 68.2k | op->ob_refcnt++; | 460 | 68.2k | } |
Line | Count | Source | 457 | 39.4k | { | 458 | 39.4k | _Py_INC_REFTOTAL; | 459 | 39.4k | op->ob_refcnt++; | 460 | 39.4k | } |
Unexecuted instantiation: capsule.c:_Py_INCREF Line | Count | Source | 457 | 14.5k | { | 458 | 14.5k | _Py_INC_REFTOTAL; | 459 | 14.5k | op->ob_refcnt++; | 460 | 14.5k | } |
Unexecuted instantiation: floatobject.c:_Py_INCREF Line | Count | Source | 457 | 160k | { | 458 | 160k | _Py_INC_REFTOTAL; | 459 | 160k | op->ob_refcnt++; | 460 | 160k | } |
Line | Count | Source | 457 | 78.6k | { | 458 | 78.6k | _Py_INC_REFTOTAL; | 459 | 78.6k | op->ob_refcnt++; | 460 | 78.6k | } |
Line | Count | Source | 457 | 67 | { | 458 | 67 | _Py_INC_REFTOTAL; | 459 | 67 | op->ob_refcnt++; | 460 | 67 | } |
Line | Count | Source | 457 | 119k | { | 458 | 119k | _Py_INC_REFTOTAL; | 459 | 119k | op->ob_refcnt++; | 460 | 119k | } |
Line | Count | Source | 457 | 38.4k | { | 458 | 38.4k | _Py_INC_REFTOTAL; | 459 | 38.4k | op->ob_refcnt++; | 460 | 38.4k | } |
Line | Count | Source | 457 | 918k | { | 458 | 918k | _Py_INC_REFTOTAL; | 459 | 918k | op->ob_refcnt++; | 460 | 918k | } |
memoryobject.c:_Py_INCREF Line | Count | Source | 457 | 743 | { | 458 | 743 | _Py_INC_REFTOTAL; | 459 | 743 | op->ob_refcnt++; | 460 | 743 | } |
methodobject.c:_Py_INCREF Line | Count | Source | 457 | 22.1k | { | 458 | 22.1k | _Py_INC_REFTOTAL; | 459 | 22.1k | op->ob_refcnt++; | 460 | 22.1k | } |
moduleobject.c:_Py_INCREF Line | Count | Source | 457 | 4.27k | { | 458 | 4.27k | _Py_INC_REFTOTAL; | 459 | 4.27k | op->ob_refcnt++; | 460 | 4.27k | } |
Line | Count | Source | 457 | 321k | { | 458 | 321k | _Py_INC_REFTOTAL; | 459 | 321k | op->ob_refcnt++; | 460 | 321k | } |
Unexecuted instantiation: obmalloc.c:_Py_INCREF Unexecuted instantiation: picklebufobject.c:_Py_INCREF Line | Count | Source | 457 | 264 | { | 458 | 264 | _Py_INC_REFTOTAL; | 459 | 264 | op->ob_refcnt++; | 460 | 264 | } |
Line | Count | Source | 457 | 9.72k | { | 458 | 9.72k | _Py_INC_REFTOTAL; | 459 | 9.72k | op->ob_refcnt++; | 460 | 9.72k | } |
Line | Count | Source | 457 | 7.18k | { | 458 | 7.18k | _Py_INC_REFTOTAL; | 459 | 7.18k | op->ob_refcnt++; | 460 | 7.18k | } |
Line | Count | Source | 457 | 140 | { | 458 | 140 | _Py_INC_REFTOTAL; | 459 | 140 | op->ob_refcnt++; | 460 | 140 | } |
Line | Count | Source | 457 | 88.4k | { | 458 | 88.4k | _Py_INC_REFTOTAL; | 459 | 88.4k | op->ob_refcnt++; | 460 | 88.4k | } |
Line | Count | Source | 457 | 280k | { | 458 | 280k | _Py_INC_REFTOTAL; | 459 | 280k | op->ob_refcnt++; | 460 | 280k | } |
unicodeobject.c:_Py_INCREF Line | Count | Source | 457 | 70.8k | { | 458 | 70.8k | _Py_INC_REFTOTAL; | 459 | 70.8k | op->ob_refcnt++; | 460 | 70.8k | } |
Unexecuted instantiation: unicodectype.c:_Py_INCREF weakrefobject.c:_Py_INCREF Line | Count | Source | 457 | 3.29k | { | 458 | 3.29k | _Py_INC_REFTOTAL; | 459 | 3.29k | op->ob_refcnt++; | 460 | 3.29k | } |
Line | Count | Source | 457 | 84 | { | 458 | 84 | _Py_INC_REFTOTAL; | 459 | 84 | op->ob_refcnt++; | 460 | 84 | } |
Line | Count | Source | 457 | 557k | { | 458 | 557k | _Py_INC_REFTOTAL; | 459 | 557k | op->ob_refcnt++; | 460 | 557k | } |
Line | Count | Source | 457 | 140 | { | 458 | 140 | _Py_INC_REFTOTAL; | 459 | 140 | op->ob_refcnt++; | 460 | 140 | } |
Line | Count | Source | 457 | 1.18k | { | 458 | 1.18k | _Py_INC_REFTOTAL; | 459 | 1.18k | op->ob_refcnt++; | 460 | 1.18k | } |
Line | Count | Source | 457 | 18.6k | { | 458 | 18.6k | _Py_INC_REFTOTAL; | 459 | 18.6k | op->ob_refcnt++; | 460 | 18.6k | } |
Unexecuted instantiation: future.c:_Py_INCREF Unexecuted instantiation: getargs.c:_Py_INCREF Unexecuted instantiation: getversion.c:_Py_INCREF Line | Count | Source | 457 | 11.2k | { | 458 | 11.2k | _Py_INC_REFTOTAL; | 459 | 11.2k | op->ob_refcnt++; | 460 | 11.2k | } |
Unexecuted instantiation: importdl.c:_Py_INCREF Unexecuted instantiation: initconfig.c:_Py_INCREF Line | Count | Source | 457 | 127k | { | 458 | 127k | _Py_INC_REFTOTAL; | 459 | 127k | op->ob_refcnt++; | 460 | 127k | } |
Line | Count | Source | 457 | 4.29k | { | 458 | 4.29k | _Py_INC_REFTOTAL; | 459 | 4.29k | op->ob_refcnt++; | 460 | 4.29k | } |
Unexecuted instantiation: mysnprintf.c:_Py_INCREF Unexecuted instantiation: pathconfig.c:_Py_INCREF Unexecuted instantiation: peephole.c:_Py_INCREF Unexecuted instantiation: preconfig.c:_Py_INCREF Unexecuted instantiation: pyarena.c:_Py_INCREF Unexecuted instantiation: pyctype.c:_Py_INCREF Unexecuted instantiation: pyhash.c:_Py_INCREF Line | Count | Source | 457 | 42 | { | 458 | 42 | _Py_INC_REFTOTAL; | 459 | 42 | op->ob_refcnt++; | 460 | 42 | } |
Unexecuted instantiation: pymath.c:_Py_INCREF Line | Count | Source | 457 | 203 | { | 458 | 203 | _Py_INC_REFTOTAL; | 459 | 203 | op->ob_refcnt++; | 460 | 203 | } |
Unexecuted instantiation: pythonrun.c:_Py_INCREF Unexecuted instantiation: pytime.c:_Py_INCREF Unexecuted instantiation: bootstrap_hash.c:_Py_INCREF Line | Count | Source | 457 | 60 | { | 458 | 60 | _Py_INC_REFTOTAL; | 459 | 60 | op->ob_refcnt++; | 460 | 60 | } |
Line | Count | Source | 457 | 50 | { | 458 | 50 | _Py_INC_REFTOTAL; | 459 | 50 | op->ob_refcnt++; | 460 | 50 | } |
Unexecuted instantiation: thread.c:_Py_INCREF Line | Count | Source | 457 | 3.91k | { | 458 | 3.91k | _Py_INC_REFTOTAL; | 459 | 3.91k | op->ob_refcnt++; | 460 | 3.91k | } |
Unexecuted instantiation: getopt.c:_Py_INCREF Unexecuted instantiation: pystrcmp.c:_Py_INCREF Unexecuted instantiation: pystrtod.c:_Py_INCREF Unexecuted instantiation: pystrhex.c:_Py_INCREF Unexecuted instantiation: dtoa.c:_Py_INCREF Unexecuted instantiation: formatter_unicode.c:_Py_INCREF Unexecuted instantiation: fileutils.c:_Py_INCREF Unexecuted instantiation: dynload_shlib.c:_Py_INCREF Unexecuted instantiation: config.c:_Py_INCREF Unexecuted instantiation: getpath.c:_Py_INCREF Line | Count | Source | 457 | 913 | { | 458 | 913 | _Py_INC_REFTOTAL; | 459 | 913 | op->ob_refcnt++; | 460 | 913 | } |
Line | Count | Source | 457 | 4.26k | { | 458 | 4.26k | _Py_INC_REFTOTAL; | 459 | 4.26k | op->ob_refcnt++; | 460 | 4.26k | } |
Unexecuted instantiation: errnomodule.c:_Py_INCREF Unexecuted instantiation: pwdmodule.c:_Py_INCREF Line | Count | Source | 457 | 26 | { | 458 | 26 | _Py_INC_REFTOTAL; | 459 | 26 | op->ob_refcnt++; | 460 | 26 | } |
_codecsmodule.c:_Py_INCREF Line | Count | Source | 457 | 14 | { | 458 | 14 | _Py_INC_REFTOTAL; | 459 | 14 | op->ob_refcnt++; | 460 | 14 | } |
Line | Count | Source | 457 | 56 | { | 458 | 56 | _Py_INC_REFTOTAL; | 459 | 56 | op->ob_refcnt++; | 460 | 56 | } |
_functoolsmodule.c:_Py_INCREF Line | Count | Source | 457 | 5 | { | 458 | 5 | _Py_INC_REFTOTAL; | 459 | 5 | op->ob_refcnt++; | 460 | 5 | } |
Line | Count | Source | 457 | 3 | { | 458 | 3 | _Py_INC_REFTOTAL; | 459 | 3 | op->ob_refcnt++; | 460 | 3 | } |
_collectionsmodule.c:_Py_INCREF Line | Count | Source | 457 | 17 | { | 458 | 17 | _Py_INC_REFTOTAL; | 459 | 17 | op->ob_refcnt++; | 460 | 17 | } |
Line | Count | Source | 457 | 5.31k | { | 458 | 5.31k | _Py_INC_REFTOTAL; | 459 | 5.31k | op->ob_refcnt++; | 460 | 5.31k | } |
itertoolsmodule.c:_Py_INCREF Line | Count | Source | 457 | 288 | { | 458 | 288 | _Py_INC_REFTOTAL; | 459 | 288 | op->ob_refcnt++; | 460 | 288 | } |
atexitmodule.c:_Py_INCREF Line | Count | Source | 457 | 2 | { | 458 | 2 | _Py_INC_REFTOTAL; | 459 | 2 | op->ob_refcnt++; | 460 | 2 | } |
Unexecuted instantiation: signalmodule.c:_Py_INCREF Unexecuted instantiation: _stat.c:_Py_INCREF Line | Count | Source | 457 | 14 | { | 458 | 14 | _Py_INC_REFTOTAL; | 459 | 14 | op->ob_refcnt++; | 460 | 14 | } |
_threadmodule.c:_Py_INCREF Line | Count | Source | 457 | 961 | { | 458 | 961 | _Py_INC_REFTOTAL; | 459 | 961 | op->ob_refcnt++; | 460 | 961 | } |
Unexecuted instantiation: _localemodule.c:_Py_INCREF Line | Count | Source | 457 | 252 | { | 458 | 252 | _Py_INC_REFTOTAL; | 459 | 252 | op->ob_refcnt++; | 460 | 252 | } |
Line | Count | Source | 457 | 989 | { | 458 | 989 | _Py_INC_REFTOTAL; | 459 | 989 | op->ob_refcnt++; | 460 | 989 | } |
Unexecuted instantiation: fileio.c:_Py_INCREF Unexecuted instantiation: bytesio.c:_Py_INCREF Line | Count | Source | 457 | 541 | { | 458 | 541 | _Py_INC_REFTOTAL; | 459 | 541 | op->ob_refcnt++; | 460 | 541 | } |
Line | Count | Source | 457 | 378 | { | 458 | 378 | _Py_INC_REFTOTAL; | 459 | 378 | op->ob_refcnt++; | 460 | 378 | } |
Line | Count | Source | 457 | 70 | { | 458 | 70 | _Py_INC_REFTOTAL; | 459 | 70 | op->ob_refcnt++; | 460 | 70 | } |
Unexecuted instantiation: faulthandler.c:_Py_INCREF Unexecuted instantiation: _tracemalloc.c:_Py_INCREF Unexecuted instantiation: hashtable.c:_Py_INCREF Unexecuted instantiation: symtablemodule.c:_Py_INCREF Unexecuted instantiation: xxsubtype.c:_Py_INCREF Unexecuted instantiation: frozen.c:_Py_INCREF Unexecuted instantiation: getbuildinfo.c:_Py_INCREF Unexecuted instantiation: acceler.c:_Py_INCREF Unexecuted instantiation: grammar1.c:_Py_INCREF Unexecuted instantiation: node.c:_Py_INCREF Unexecuted instantiation: token.c:_Py_INCREF Line | Count | Source | 457 | 32 | { | 458 | 32 | _Py_INC_REFTOTAL; | 459 | 32 | op->ob_refcnt++; | 460 | 32 | } |
Unexecuted instantiation: tokenizer.c:_Py_INCREF Unexecuted instantiation: accu.c:_Py_INCREF Unexecuted instantiation: bytes_methods.c:_Py_INCREF Line | Count | Source | 457 | 309 | { | 458 | 309 | _Py_INC_REFTOTAL; | 459 | 309 | op->ob_refcnt++; | 460 | 309 | } |
Line | Count | Source | 457 | 16.0k | { | 458 | 16.0k | _Py_INC_REFTOTAL; | 459 | 16.0k | op->ob_refcnt++; | 460 | 16.0k | } |
Line | Count | Source | 457 | 99.5k | { | 458 | 99.5k | _Py_INC_REFTOTAL; | 459 | 99.5k | op->ob_refcnt++; | 460 | 99.5k | } |
Unexecuted instantiation: complexobject.c:_Py_INCREF Line | Count | Source | 457 | 31.7k | { | 458 | 31.7k | _Py_INC_REFTOTAL; | 459 | 31.7k | op->ob_refcnt++; | 460 | 31.7k | } |
Line | Count | Source | 457 | 82 | { | 458 | 82 | _Py_INC_REFTOTAL; | 459 | 82 | op->ob_refcnt++; | 460 | 82 | } |
Line | Count | Source | 457 | 2.62k | { | 458 | 2.62k | _Py_INC_REFTOTAL; | 459 | 2.62k | op->ob_refcnt++; | 460 | 2.62k | } |
Unexecuted instantiation: fileobject.c:_Py_INCREF Unexecuted instantiation: interpreteridobject.c:_Py_INCREF Unexecuted instantiation: odictobject.c:_Py_INCREF Unexecuted instantiation: namespaceobject.c:_Py_INCREF Unexecuted instantiation: Python-ast.c:_Py_INCREF Unexecuted instantiation: asdl.c:_Py_INCREF Unexecuted instantiation: ast.c:_Py_INCREF Line | Count | Source | 457 | 4 | { | 458 | 4 | _Py_INC_REFTOTAL; | 459 | 4 | op->ob_refcnt++; | 460 | 4 | } |
Unexecuted instantiation: ast_unparse.c:_Py_INCREF Line | Count | Source | 457 | 6.58k | { | 458 | 6.58k | _Py_INC_REFTOTAL; | 459 | 6.58k | op->ob_refcnt++; | 460 | 6.58k | } |
Line | Count | Source | 457 | 14 | { | 458 | 14 | _Py_INC_REFTOTAL; | 459 | 14 | op->ob_refcnt++; | 460 | 14 | } |
Unexecuted instantiation: getcompiler.c:_Py_INCREF Unexecuted instantiation: getcopyright.c:_Py_INCREF Unexecuted instantiation: getplatform.c:_Py_INCREF Unexecuted instantiation: hamt.c:_Py_INCREF Unexecuted instantiation: mystrtoul.c:_Py_INCREF structmember.c:_Py_INCREF Line | Count | Source | 457 | 6.24k | { | 458 | 6.24k | _Py_INC_REFTOTAL; | 459 | 6.24k | op->ob_refcnt++; | 460 | 6.24k | } |
Unexecuted instantiation: parser.c:_Py_INCREF Unexecuted instantiation: myreadline.c:_Py_INCREF |
461 | | |
462 | 3.29M | #define Py_INCREF(op) _Py_INCREF(_PyObject_CAST(op)) |
463 | | |
464 | | static inline void _Py_DECREF(const char *filename, int lineno, |
465 | | PyObject *op) |
466 | 2.99M | { |
467 | 2.99M | (void)filename; /* may be unused, shut up -Wunused-parameter */ |
468 | 2.99M | (void)lineno; /* may be unused, shut up -Wunused-parameter */ |
469 | 2.99M | _Py_DEC_REFTOTAL; |
470 | 2.99M | if (--op->ob_refcnt != 0) { |
471 | | #ifdef Py_REF_DEBUG |
472 | | if (op->ob_refcnt < 0) { |
473 | | _Py_NegativeRefcount(filename, lineno, op); |
474 | | } |
475 | | #endif |
476 | 2.50M | } |
477 | 486k | else { |
478 | 486k | _Py_Dealloc(op); |
479 | 486k | } |
480 | 2.99M | } Line | Count | Source | 466 | 22.3k | { | 467 | 22.3k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 22.3k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 22.3k | _Py_DEC_REFTOTAL; | 470 | 22.3k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 20.1k | } | 477 | 2.24k | else { | 478 | 2.24k | _Py_Dealloc(op); | 479 | 2.24k | } | 480 | 22.3k | } |
Unexecuted instantiation: boolobject.c:_Py_DECREF bytearrayobject.c:_Py_DECREF Line | Count | Source | 466 | 14 | { | 467 | 14 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 14 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 14 | _Py_DEC_REFTOTAL; | 470 | 14 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 0 | } | 477 | 14 | else { | 478 | 14 | _Py_Dealloc(op); | 479 | 14 | } | 480 | 14 | } |
Line | Count | Source | 466 | 615 | { | 467 | 615 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 615 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 615 | _Py_DEC_REFTOTAL; | 470 | 615 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 608 | } | 477 | 7 | else { | 478 | 7 | _Py_Dealloc(op); | 479 | 7 | } | 480 | 615 | } |
Line | Count | Source | 466 | 64.0k | { | 467 | 64.0k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 64.0k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 64.0k | _Py_DEC_REFTOTAL; | 470 | 64.0k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 19.9k | } | 477 | 44.1k | else { | 478 | 44.1k | _Py_Dealloc(op); | 479 | 44.1k | } | 480 | 64.0k | } |
Unexecuted instantiation: capsule.c:_Py_DECREF Line | Count | Source | 466 | 15.8k | { | 467 | 15.8k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 15.8k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 15.8k | _Py_DEC_REFTOTAL; | 470 | 15.8k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 11.7k | } | 477 | 4.14k | else { | 478 | 4.14k | _Py_Dealloc(op); | 479 | 4.14k | } | 480 | 15.8k | } |
Unexecuted instantiation: floatobject.c:_Py_DECREF Line | Count | Source | 466 | 268k | { | 467 | 268k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 268k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 268k | _Py_DEC_REFTOTAL; | 470 | 268k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 252k | } | 477 | 15.8k | else { | 478 | 15.8k | _Py_Dealloc(op); | 479 | 15.8k | } | 480 | 268k | } |
Line | Count | Source | 466 | 25.4k | { | 467 | 25.4k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 25.4k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 25.4k | _Py_DEC_REFTOTAL; | 470 | 25.4k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 24.8k | } | 477 | 595 | else { | 478 | 595 | _Py_Dealloc(op); | 479 | 595 | } | 480 | 25.4k | } |
Line | Count | Source | 466 | 67 | { | 467 | 67 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 67 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 67 | _Py_DEC_REFTOTAL; | 470 | 67 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 67 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 67 | } |
Line | Count | Source | 466 | 108k | { | 467 | 108k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 108k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 108k | _Py_DEC_REFTOTAL; | 470 | 108k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 103k | } | 477 | 4.43k | else { | 478 | 4.43k | _Py_Dealloc(op); | 479 | 4.43k | } | 480 | 108k | } |
Line | Count | Source | 466 | 7.25k | { | 467 | 7.25k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 7.25k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 7.25k | _Py_DEC_REFTOTAL; | 470 | 7.25k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 5.32k | } | 477 | 1.93k | else { | 478 | 1.93k | _Py_Dealloc(op); | 479 | 1.93k | } | 480 | 7.25k | } |
Line | Count | Source | 466 | 623k | { | 467 | 623k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 623k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 623k | _Py_DEC_REFTOTAL; | 470 | 623k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 397k | } | 477 | 225k | else { | 478 | 225k | _Py_Dealloc(op); | 479 | 225k | } | 480 | 623k | } |
memoryobject.c:_Py_DECREF Line | Count | Source | 466 | 747 | { | 467 | 747 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 747 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 747 | _Py_DEC_REFTOTAL; | 470 | 747 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 493 | } | 477 | 254 | else { | 478 | 254 | _Py_Dealloc(op); | 479 | 254 | } | 480 | 747 | } |
methodobject.c:_Py_DECREF Line | Count | Source | 466 | 8.84k | { | 467 | 8.84k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 8.84k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 8.84k | _Py_DEC_REFTOTAL; | 470 | 8.84k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 8.65k | } | 477 | 187 | else { | 478 | 187 | _Py_Dealloc(op); | 479 | 187 | } | 480 | 8.84k | } |
moduleobject.c:_Py_DECREF Line | Count | Source | 466 | 11.0k | { | 467 | 11.0k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 11.0k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 11.0k | _Py_DEC_REFTOTAL; | 470 | 11.0k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 11.0k | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 11.0k | } |
Line | Count | Source | 466 | 346k | { | 467 | 346k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 346k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 346k | _Py_DEC_REFTOTAL; | 470 | 346k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 346k | } | 477 | 28 | else { | 478 | 28 | _Py_Dealloc(op); | 479 | 28 | } | 480 | 346k | } |
Unexecuted instantiation: obmalloc.c:_Py_DECREF Unexecuted instantiation: picklebufobject.c:_Py_DECREF Line | Count | Source | 466 | 1.14k | { | 467 | 1.14k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.14k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.14k | _Py_DEC_REFTOTAL; | 470 | 1.14k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 1.05k | } | 477 | 89 | else { | 478 | 89 | _Py_Dealloc(op); | 479 | 89 | } | 480 | 1.14k | } |
Line | Count | Source | 466 | 5.99k | { | 467 | 5.99k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 5.99k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 5.99k | _Py_DEC_REFTOTAL; | 470 | 5.99k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 5.73k | } | 477 | 253 | else { | 478 | 253 | _Py_Dealloc(op); | 479 | 253 | } | 480 | 5.99k | } |
Line | Count | Source | 466 | 7.18k | { | 467 | 7.18k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 7.18k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 7.18k | _Py_DEC_REFTOTAL; | 470 | 7.18k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 6.64k | } | 477 | 540 | else { | 478 | 540 | _Py_Dealloc(op); | 479 | 540 | } | 480 | 7.18k | } |
Line | Count | Source | 466 | 17.8k | { | 467 | 17.8k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 17.8k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 17.8k | _Py_DEC_REFTOTAL; | 470 | 17.8k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 6.67k | } | 477 | 11.2k | else { | 478 | 11.2k | _Py_Dealloc(op); | 479 | 11.2k | } | 480 | 17.8k | } |
Line | Count | Source | 466 | 154k | { | 467 | 154k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 154k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 154k | _Py_DEC_REFTOTAL; | 470 | 154k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 142k | } | 477 | 11.9k | else { | 478 | 11.9k | _Py_Dealloc(op); | 479 | 11.9k | } | 480 | 154k | } |
Line | Count | Source | 466 | 254k | { | 467 | 254k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 254k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 254k | _Py_DEC_REFTOTAL; | 470 | 254k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 246k | } | 477 | 7.87k | else { | 478 | 7.87k | _Py_Dealloc(op); | 479 | 7.87k | } | 480 | 254k | } |
unicodeobject.c:_Py_DECREF Line | Count | Source | 466 | 65.0k | { | 467 | 65.0k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 65.0k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 65.0k | _Py_DEC_REFTOTAL; | 470 | 65.0k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 10.5k | } | 477 | 54.5k | else { | 478 | 54.5k | _Py_Dealloc(op); | 479 | 54.5k | } | 480 | 65.0k | } |
Unexecuted instantiation: unicodectype.c:_Py_DECREF weakrefobject.c:_Py_DECREF Line | Count | Source | 466 | 2.06k | { | 467 | 2.06k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 2.06k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 2.06k | _Py_DEC_REFTOTAL; | 470 | 2.06k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 1.56k | } | 477 | 505 | else { | 478 | 505 | _Py_Dealloc(op); | 479 | 505 | } | 480 | 2.06k | } |
Unexecuted instantiation: _warnings.c:_Py_DECREF Line | Count | Source | 466 | 740k | { | 467 | 740k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 740k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 740k | _Py_DEC_REFTOTAL; | 470 | 740k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 675k | } | 477 | 65.4k | else { | 478 | 65.4k | _Py_Dealloc(op); | 479 | 65.4k | } | 480 | 740k | } |
Line | Count | Source | 466 | 297 | { | 467 | 297 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 297 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 297 | _Py_DEC_REFTOTAL; | 470 | 297 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 268 | } | 477 | 29 | else { | 478 | 29 | _Py_Dealloc(op); | 479 | 29 | } | 480 | 297 | } |
Line | Count | Source | 466 | 1.41k | { | 467 | 1.41k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.41k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.41k | _Py_DEC_REFTOTAL; | 470 | 1.41k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 1.13k | } | 477 | 284 | else { | 478 | 284 | _Py_Dealloc(op); | 479 | 284 | } | 480 | 1.41k | } |
Line | Count | Source | 466 | 22.1k | { | 467 | 22.1k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 22.1k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 22.1k | _Py_DEC_REFTOTAL; | 470 | 22.1k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 16.2k | } | 477 | 5.84k | else { | 478 | 5.84k | _Py_Dealloc(op); | 479 | 5.84k | } | 480 | 22.1k | } |
Unexecuted instantiation: future.c:_Py_DECREF Line | Count | Source | 466 | 1.23k | { | 467 | 1.23k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.23k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.23k | _Py_DEC_REFTOTAL; | 470 | 1.23k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 1.23k | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 1.23k | } |
Unexecuted instantiation: getversion.c:_Py_DECREF Line | Count | Source | 466 | 10.3k | { | 467 | 10.3k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 10.3k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 10.3k | _Py_DEC_REFTOTAL; | 470 | 10.3k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 9.44k | } | 477 | 946 | else { | 478 | 946 | _Py_Dealloc(op); | 479 | 946 | } | 480 | 10.3k | } |
Unexecuted instantiation: importdl.c:_Py_DECREF Unexecuted instantiation: initconfig.c:_Py_DECREF Line | Count | Source | 466 | 99.6k | { | 467 | 99.6k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 99.6k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 99.6k | _Py_DEC_REFTOTAL; | 470 | 99.6k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 99.3k | } | 477 | 277 | else { | 478 | 277 | _Py_Dealloc(op); | 479 | 277 | } | 480 | 99.6k | } |
Line | Count | Source | 466 | 3.73k | { | 467 | 3.73k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 3.73k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 3.73k | _Py_DEC_REFTOTAL; | 470 | 3.73k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 3.73k | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 3.73k | } |
Unexecuted instantiation: mysnprintf.c:_Py_DECREF Unexecuted instantiation: pathconfig.c:_Py_DECREF Unexecuted instantiation: peephole.c:_Py_DECREF Unexecuted instantiation: preconfig.c:_Py_DECREF Line | Count | Source | 466 | 462 | { | 467 | 462 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 462 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 462 | _Py_DEC_REFTOTAL; | 470 | 462 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 446 | } | 477 | 16 | else { | 478 | 16 | _Py_Dealloc(op); | 479 | 16 | } | 480 | 462 | } |
Unexecuted instantiation: pyctype.c:_Py_DECREF Unexecuted instantiation: pyhash.c:_Py_DECREF Line | Count | Source | 466 | 532 | { | 467 | 532 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 532 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 532 | _Py_DEC_REFTOTAL; | 470 | 532 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 490 | } | 477 | 42 | else { | 478 | 42 | _Py_Dealloc(op); | 479 | 42 | } | 480 | 532 | } |
Unexecuted instantiation: pymath.c:_Py_DECREF Unexecuted instantiation: pystate.c:_Py_DECREF Line | Count | Source | 466 | 32 | { | 467 | 32 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 32 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 32 | _Py_DEC_REFTOTAL; | 470 | 32 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 30 | } | 477 | 2 | else { | 478 | 2 | _Py_Dealloc(op); | 479 | 2 | } | 480 | 32 | } |
Unexecuted instantiation: pytime.c:_Py_DECREF Unexecuted instantiation: bootstrap_hash.c:_Py_DECREF Line | Count | Source | 466 | 1.45k | { | 467 | 1.45k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.45k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.45k | _Py_DEC_REFTOTAL; | 470 | 1.45k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 1.08k | } | 477 | 368 | else { | 478 | 368 | _Py_Dealloc(op); | 479 | 368 | } | 480 | 1.45k | } |
Line | Count | Source | 466 | 966 | { | 467 | 966 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 966 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 966 | _Py_DEC_REFTOTAL; | 470 | 966 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 938 | } | 477 | 28 | else { | 478 | 28 | _Py_Dealloc(op); | 479 | 28 | } | 480 | 966 | } |
Unexecuted instantiation: thread.c:_Py_DECREF Line | Count | Source | 466 | 4.23k | { | 467 | 4.23k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 4.23k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 4.23k | _Py_DEC_REFTOTAL; | 470 | 4.23k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 3.38k | } | 477 | 854 | else { | 478 | 854 | _Py_Dealloc(op); | 479 | 854 | } | 480 | 4.23k | } |
Unexecuted instantiation: getopt.c:_Py_DECREF Unexecuted instantiation: pystrcmp.c:_Py_DECREF Unexecuted instantiation: pystrtod.c:_Py_DECREF Unexecuted instantiation: pystrhex.c:_Py_DECREF Unexecuted instantiation: dtoa.c:_Py_DECREF Unexecuted instantiation: formatter_unicode.c:_Py_DECREF Unexecuted instantiation: fileutils.c:_Py_DECREF Unexecuted instantiation: dynload_shlib.c:_Py_DECREF Unexecuted instantiation: config.c:_Py_DECREF Unexecuted instantiation: getpath.c:_Py_DECREF Line | Count | Source | 466 | 59 | { | 467 | 59 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 59 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 59 | _Py_DEC_REFTOTAL; | 470 | 59 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 53 | } | 477 | 6 | else { | 478 | 6 | _Py_Dealloc(op); | 479 | 6 | } | 480 | 59 | } |
Line | Count | Source | 466 | 15.9k | { | 467 | 15.9k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 15.9k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 15.9k | _Py_DEC_REFTOTAL; | 470 | 15.9k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 9.75k | } | 477 | 6.23k | else { | 478 | 6.23k | _Py_Dealloc(op); | 479 | 6.23k | } | 480 | 15.9k | } |
Unexecuted instantiation: errnomodule.c:_Py_DECREF Unexecuted instantiation: pwdmodule.c:_Py_DECREF Line | Count | Source | 466 | 29 | { | 467 | 29 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 29 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 29 | _Py_DEC_REFTOTAL; | 470 | 29 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 28 | } | 477 | 1 | else { | 478 | 1 | _Py_Dealloc(op); | 479 | 1 | } | 480 | 29 | } |
Unexecuted instantiation: _codecsmodule.c:_Py_DECREF Unexecuted instantiation: _weakref.c:_Py_DECREF _functoolsmodule.c:_Py_DECREF Line | Count | Source | 466 | 3 | { | 467 | 3 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 3 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 3 | _Py_DEC_REFTOTAL; | 470 | 3 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 0 | } | 477 | 3 | else { | 478 | 3 | _Py_Dealloc(op); | 479 | 3 | } | 480 | 3 | } |
Unexecuted instantiation: _operator.c:_Py_DECREF _collectionsmodule.c:_Py_DECREF Line | Count | Source | 466 | 12 | { | 467 | 12 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 12 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 12 | _Py_DEC_REFTOTAL; | 470 | 12 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 12 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 12 | } |
Line | Count | Source | 466 | 16.1k | { | 467 | 16.1k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 16.1k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 16.1k | _Py_DEC_REFTOTAL; | 470 | 16.1k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 14.3k | } | 477 | 1.78k | else { | 478 | 1.78k | _Py_Dealloc(op); | 479 | 1.78k | } | 480 | 16.1k | } |
itertoolsmodule.c:_Py_DECREF Line | Count | Source | 466 | 291 | { | 467 | 291 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 291 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 291 | _Py_DEC_REFTOTAL; | 470 | 291 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 206 | } | 477 | 85 | else { | 478 | 85 | _Py_Dealloc(op); | 479 | 85 | } | 480 | 291 | } |
Unexecuted instantiation: atexitmodule.c:_Py_DECREF Unexecuted instantiation: signalmodule.c:_Py_DECREF Unexecuted instantiation: _stat.c:_Py_DECREF Unexecuted instantiation: timemodule.c:_Py_DECREF Unexecuted instantiation: _threadmodule.c:_Py_DECREF Unexecuted instantiation: _localemodule.c:_Py_DECREF Line | Count | Source | 466 | 1.69k | { | 467 | 1.69k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.69k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.69k | _Py_DEC_REFTOTAL; | 470 | 1.69k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 1.14k | } | 477 | 556 | else { | 478 | 556 | _Py_Dealloc(op); | 479 | 556 | } | 480 | 1.69k | } |
Line | Count | Source | 466 | 1.22k | { | 467 | 1.22k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.22k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.22k | _Py_DEC_REFTOTAL; | 470 | 1.22k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 1.22k | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 1.22k | } |
Line | Count | Source | 466 | 472 | { | 467 | 472 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 472 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 472 | _Py_DEC_REFTOTAL; | 470 | 472 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 0 | } | 477 | 472 | else { | 478 | 472 | _Py_Dealloc(op); | 479 | 472 | } | 480 | 472 | } |
Unexecuted instantiation: bytesio.c:_Py_DECREF Line | Count | Source | 466 | 1.81k | { | 467 | 1.81k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.81k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.81k | _Py_DEC_REFTOTAL; | 470 | 1.81k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 1.28k | } | 477 | 532 | else { | 478 | 532 | _Py_Dealloc(op); | 479 | 532 | } | 480 | 1.81k | } |
Line | Count | Source | 466 | 626 | { | 467 | 626 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 626 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 626 | _Py_DEC_REFTOTAL; | 470 | 626 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 513 | } | 477 | 113 | else { | 478 | 113 | _Py_Dealloc(op); | 479 | 113 | } | 480 | 626 | } |
Line | Count | Source | 466 | 70 | { | 467 | 70 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 70 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 70 | _Py_DEC_REFTOTAL; | 470 | 70 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 70 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 70 | } |
Unexecuted instantiation: faulthandler.c:_Py_DECREF Unexecuted instantiation: _tracemalloc.c:_Py_DECREF Unexecuted instantiation: hashtable.c:_Py_DECREF Unexecuted instantiation: symtablemodule.c:_Py_DECREF Unexecuted instantiation: xxsubtype.c:_Py_DECREF Unexecuted instantiation: frozen.c:_Py_DECREF Unexecuted instantiation: getbuildinfo.c:_Py_DECREF Unexecuted instantiation: acceler.c:_Py_DECREF Unexecuted instantiation: grammar1.c:_Py_DECREF Unexecuted instantiation: node.c:_Py_DECREF Unexecuted instantiation: token.c:_Py_DECREF Unexecuted instantiation: parsetok.c:_Py_DECREF Line | Count | Source | 466 | 16 | { | 467 | 16 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 16 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 16 | _Py_DEC_REFTOTAL; | 470 | 16 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 16 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 16 | } |
Line | Count | Source | 466 | 42 | { | 467 | 42 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 42 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 42 | _Py_DEC_REFTOTAL; | 470 | 42 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 14 | } | 477 | 28 | else { | 478 | 28 | _Py_Dealloc(op); | 479 | 28 | } | 480 | 42 | } |
Unexecuted instantiation: bytes_methods.c:_Py_DECREF Line | Count | Source | 466 | 178 | { | 467 | 178 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 178 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 178 | _Py_DEC_REFTOTAL; | 470 | 178 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 165 | } | 477 | 13 | else { | 478 | 13 | _Py_Dealloc(op); | 479 | 13 | } | 480 | 178 | } |
Line | Count | Source | 466 | 16.0k | { | 467 | 16.0k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 16.0k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 16.0k | _Py_DEC_REFTOTAL; | 470 | 16.0k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 14.7k | } | 477 | 1.29k | else { | 478 | 1.29k | _Py_Dealloc(op); | 479 | 1.29k | } | 480 | 16.0k | } |
Line | Count | Source | 466 | 19.7k | { | 467 | 19.7k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 19.7k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 19.7k | _Py_DEC_REFTOTAL; | 470 | 19.7k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 11.1k | } | 477 | 8.63k | else { | 478 | 8.63k | _Py_Dealloc(op); | 479 | 8.63k | } | 480 | 19.7k | } |
Unexecuted instantiation: complexobject.c:_Py_DECREF Line | Count | Source | 466 | 4.26k | { | 467 | 4.26k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 4.26k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 4.26k | _Py_DEC_REFTOTAL; | 470 | 4.26k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 2.83k | } | 477 | 1.43k | else { | 478 | 1.43k | _Py_Dealloc(op); | 479 | 1.43k | } | 480 | 4.26k | } |
Line | Count | Source | 466 | 190 | { | 467 | 190 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 190 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 190 | _Py_DEC_REFTOTAL; | 470 | 190 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 164 | } | 477 | 26 | else { | 478 | 26 | _Py_Dealloc(op); | 479 | 26 | } | 480 | 190 | } |
Line | Count | Source | 466 | 2.20k | { | 467 | 2.20k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 2.20k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 2.20k | _Py_DEC_REFTOTAL; | 470 | 2.20k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 2.00k | } | 477 | 194 | else { | 478 | 194 | _Py_Dealloc(op); | 479 | 194 | } | 480 | 2.20k | } |
Line | Count | Source | 466 | 571 | { | 467 | 571 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 571 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 571 | _Py_DEC_REFTOTAL; | 470 | 571 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 459 | } | 477 | 112 | else { | 478 | 112 | _Py_Dealloc(op); | 479 | 112 | } | 480 | 571 | } |
Unexecuted instantiation: interpreteridobject.c:_Py_DECREF Unexecuted instantiation: odictobject.c:_Py_DECREF Unexecuted instantiation: namespaceobject.c:_Py_DECREF Unexecuted instantiation: Python-ast.c:_Py_DECREF Unexecuted instantiation: asdl.c:_Py_DECREF Line | Count | Source | 466 | 4 | { | 467 | 4 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 4 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 4 | _Py_DEC_REFTOTAL; | 470 | 4 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 0 | } | 477 | 4 | else { | 478 | 4 | _Py_Dealloc(op); | 479 | 4 | } | 480 | 4 | } |
Unexecuted instantiation: ast_opt.c:_Py_DECREF Unexecuted instantiation: ast_unparse.c:_Py_DECREF Line | Count | Source | 466 | 10.9k | { | 467 | 10.9k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 10.9k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 10.9k | _Py_DEC_REFTOTAL; | 470 | 10.9k | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 6.37k | } | 477 | 4.53k | else { | 478 | 4.53k | _Py_Dealloc(op); | 479 | 4.53k | } | 480 | 10.9k | } |
Line | Count | Source | 466 | 14 | { | 467 | 14 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 14 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 14 | _Py_DEC_REFTOTAL; | 470 | 14 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 14 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 14 | } |
Unexecuted instantiation: getcompiler.c:_Py_DECREF Unexecuted instantiation: getcopyright.c:_Py_DECREF Unexecuted instantiation: getplatform.c:_Py_DECREF Unexecuted instantiation: hamt.c:_Py_DECREF Unexecuted instantiation: mystrtoul.c:_Py_DECREF structmember.c:_Py_DECREF Line | Count | Source | 466 | 334 | { | 467 | 334 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 334 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 334 | _Py_DEC_REFTOTAL; | 470 | 334 | if (--op->ob_refcnt != 0) { | 471 | | #ifdef Py_REF_DEBUG | 472 | | if (op->ob_refcnt < 0) { | 473 | | _Py_NegativeRefcount(filename, lineno, op); | 474 | | } | 475 | | #endif | 476 | 334 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 334 | } |
Unexecuted instantiation: parser.c:_Py_DECREF Unexecuted instantiation: myreadline.c:_Py_DECREF |
481 | | |
482 | 2.99M | #define Py_DECREF(op) _Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op)) |
483 | | |
484 | | |
485 | | /* Safely decref `op` and set `op` to NULL, especially useful in tp_clear |
486 | | * and tp_dealloc implementations. |
487 | | * |
488 | | * Note that "the obvious" code can be deadly: |
489 | | * |
490 | | * Py_XDECREF(op); |
491 | | * op = NULL; |
492 | | * |
493 | | * Typically, `op` is something like self->containee, and `self` is done |
494 | | * using its `containee` member. In the code sequence above, suppose |
495 | | * `containee` is non-NULL with a refcount of 1. Its refcount falls to |
496 | | * 0 on the first line, which can trigger an arbitrary amount of code, |
497 | | * possibly including finalizers (like __del__ methods or weakref callbacks) |
498 | | * coded in Python, which in turn can release the GIL and allow other threads |
499 | | * to run, etc. Such code may even invoke methods of `self` again, or cause |
500 | | * cyclic gc to trigger, but-- oops! --self->containee still points to the |
501 | | * object being torn down, and it may be in an insane state while being torn |
502 | | * down. This has in fact been a rich historic source of miserable (rare & |
503 | | * hard-to-diagnose) segfaulting (and other) bugs. |
504 | | * |
505 | | * The safe way is: |
506 | | * |
507 | | * Py_CLEAR(op); |
508 | | * |
509 | | * That arranges to set `op` to NULL _before_ decref'ing, so that any code |
510 | | * triggered as a side-effect of `op` getting torn down no longer believes |
511 | | * `op` points to a valid object. |
512 | | * |
513 | | * There are cases where it's safe to use the naive code, but they're brittle. |
514 | | * For example, if `op` points to a Python integer, you know that destroying |
515 | | * one of those can't cause problems -- but in part that relies on that |
516 | | * Python integers aren't currently weakly referencable. Best practice is |
517 | | * to use Py_CLEAR() even if you can't think of a reason for why you need to. |
518 | | */ |
519 | | #define Py_CLEAR(op) \ |
520 | 318k | do { \ |
521 | 278k | PyObject *_py_tmp = _PyObject_CAST(op); \ |
522 | 278k | if (_py_tmp != NULL) { \ |
523 | 155k | (op) = NULL; \ |
524 | 155k | Py_DECREF(_py_tmp); \ |
525 | 155k | } \ |
526 | 278k | } while (0) |
527 | | |
528 | | /* Function to use in case the object pointer can be NULL: */ |
529 | | static inline void _Py_XINCREF(PyObject *op) |
530 | 158k | { |
531 | 158k | if (op != NULL) { |
532 | 127k | Py_INCREF(op); |
533 | 127k | } |
534 | 158k | } Unexecuted instantiation: abstract.c:_Py_XINCREF Unexecuted instantiation: boolobject.c:_Py_XINCREF Unexecuted instantiation: bytearrayobject.c:_Py_XINCREF Unexecuted instantiation: bytesobject.c:_Py_XINCREF Unexecuted instantiation: call.c:_Py_XINCREF Unexecuted instantiation: capsule.c:_Py_XINCREF Line | Count | Source | 530 | 4.03k | { | 531 | 4.03k | if (op != NULL) { | 532 | 640 | Py_INCREF(op); | 533 | 640 | } | 534 | 4.03k | } |
Unexecuted instantiation: floatobject.c:_Py_XINCREF frameobject.c:_Py_XINCREF Line | Count | Source | 530 | 39.7k | { | 531 | 39.7k | if (op != NULL) { | 532 | 37.1k | Py_INCREF(op); | 533 | 37.1k | } | 534 | 39.7k | } |
Unexecuted instantiation: iterobject.c:_Py_XINCREF Line | Count | Source | 530 | 640 | { | 531 | 640 | if (op != NULL) { | 532 | 640 | Py_INCREF(op); | 533 | 640 | } | 534 | 640 | } |
Unexecuted instantiation: longobject.c:_Py_XINCREF Line | Count | Source | 530 | 303 | { | 531 | 303 | if (op != NULL) { | 532 | 303 | Py_INCREF(op); | 533 | 303 | } | 534 | 303 | } |
Unexecuted instantiation: memoryobject.c:_Py_XINCREF methodobject.c:_Py_XINCREF Line | Count | Source | 530 | 33.6k | { | 531 | 33.6k | if (op != NULL) { | 532 | 22.1k | Py_INCREF(op); | 533 | 22.1k | } | 534 | 33.6k | } |
moduleobject.c:_Py_XINCREF Line | Count | Source | 530 | 1.69k | { | 531 | 1.69k | if (op != NULL) { | 532 | 1.69k | Py_INCREF(op); | 533 | 1.69k | } | 534 | 1.69k | } |
Unexecuted instantiation: object.c:_Py_XINCREF Unexecuted instantiation: obmalloc.c:_Py_XINCREF Unexecuted instantiation: picklebufobject.c:_Py_XINCREF Unexecuted instantiation: rangeobject.c:_Py_XINCREF Unexecuted instantiation: setobject.c:_Py_XINCREF Unexecuted instantiation: sliceobject.c:_Py_XINCREF Unexecuted instantiation: structseq.c:_Py_XINCREF Unexecuted instantiation: tupleobject.c:_Py_XINCREF Line | Count | Source | 530 | 4.26k | { | 531 | 4.26k | if (op != NULL) { | 532 | 14 | Py_INCREF(op); | 533 | 14 | } | 534 | 4.26k | } |
Unexecuted instantiation: unicodeobject.c:_Py_XINCREF Unexecuted instantiation: unicodectype.c:_Py_XINCREF weakrefobject.c:_Py_XINCREF Line | Count | Source | 530 | 6.18k | { | 531 | 6.18k | if (op != NULL) { | 532 | 1.24k | Py_INCREF(op); | 533 | 1.24k | } | 534 | 6.18k | } |
Unexecuted instantiation: _warnings.c:_Py_XINCREF Unexecuted instantiation: ceval.c:_Py_XINCREF Unexecuted instantiation: codecs.c:_Py_XINCREF Line | Count | Source | 530 | 10 | { | 531 | 10 | if (op != NULL) { | 532 | 4 | Py_INCREF(op); | 533 | 4 | } | 534 | 10 | } |
Line | Count | Source | 530 | 17.6k | { | 531 | 17.6k | if (op != NULL) { | 532 | 17.3k | Py_INCREF(op); | 533 | 17.3k | } | 534 | 17.6k | } |
Unexecuted instantiation: future.c:_Py_XINCREF Unexecuted instantiation: getargs.c:_Py_XINCREF Unexecuted instantiation: getversion.c:_Py_XINCREF Line | Count | Source | 530 | 2.26k | { | 531 | 2.26k | if (op != NULL) { | 532 | 1.84k | Py_INCREF(op); | 533 | 1.84k | } | 534 | 2.26k | } |
Unexecuted instantiation: importdl.c:_Py_XINCREF Unexecuted instantiation: initconfig.c:_Py_XINCREF Unexecuted instantiation: marshal.c:_Py_XINCREF Unexecuted instantiation: modsupport.c:_Py_XINCREF Unexecuted instantiation: mysnprintf.c:_Py_XINCREF Unexecuted instantiation: pathconfig.c:_Py_XINCREF Unexecuted instantiation: peephole.c:_Py_XINCREF Unexecuted instantiation: preconfig.c:_Py_XINCREF Unexecuted instantiation: pyarena.c:_Py_XINCREF Unexecuted instantiation: pyctype.c:_Py_XINCREF Unexecuted instantiation: pyhash.c:_Py_XINCREF Unexecuted instantiation: pylifecycle.c:_Py_XINCREF Unexecuted instantiation: pymath.c:_Py_XINCREF Unexecuted instantiation: pystate.c:_Py_XINCREF Unexecuted instantiation: pythonrun.c:_Py_XINCREF Unexecuted instantiation: pytime.c:_Py_XINCREF Unexecuted instantiation: bootstrap_hash.c:_Py_XINCREF Unexecuted instantiation: symtable.c:_Py_XINCREF Unexecuted instantiation: sysmodule.c:_Py_XINCREF Unexecuted instantiation: thread.c:_Py_XINCREF Line | Count | Source | 530 | 7.07k | { | 531 | 7.07k | if (op != NULL) { | 532 | 3.88k | Py_INCREF(op); | 533 | 3.88k | } | 534 | 7.07k | } |
Unexecuted instantiation: getopt.c:_Py_XINCREF Unexecuted instantiation: pystrcmp.c:_Py_XINCREF Unexecuted instantiation: pystrtod.c:_Py_XINCREF Unexecuted instantiation: pystrhex.c:_Py_XINCREF Unexecuted instantiation: dtoa.c:_Py_XINCREF Unexecuted instantiation: formatter_unicode.c:_Py_XINCREF Unexecuted instantiation: fileutils.c:_Py_XINCREF Unexecuted instantiation: dynload_shlib.c:_Py_XINCREF Unexecuted instantiation: config.c:_Py_XINCREF Unexecuted instantiation: getpath.c:_Py_XINCREF Unexecuted instantiation: gcmodule.c:_Py_XINCREF posixmodule.c:_Py_XINCREF Line | Count | Source | 530 | 14 | { | 531 | 14 | if (op != NULL) { | 532 | 14 | Py_INCREF(op); | 533 | 14 | } | 534 | 14 | } |
Unexecuted instantiation: errnomodule.c:_Py_XINCREF Unexecuted instantiation: pwdmodule.c:_Py_XINCREF Unexecuted instantiation: _sre.c:_Py_XINCREF Unexecuted instantiation: _codecsmodule.c:_Py_XINCREF Unexecuted instantiation: _weakref.c:_Py_XINCREF Unexecuted instantiation: _functoolsmodule.c:_Py_XINCREF Unexecuted instantiation: _operator.c:_Py_XINCREF Unexecuted instantiation: _collectionsmodule.c:_Py_XINCREF Line | Count | Source | 530 | 554 | { | 531 | 554 | if (op != NULL) { | 532 | 554 | Py_INCREF(op); | 533 | 554 | } | 534 | 554 | } |
Unexecuted instantiation: itertoolsmodule.c:_Py_XINCREF atexitmodule.c:_Py_XINCREF Line | Count | Source | 530 | 1 | { | 531 | 1 | if (op != NULL) { | 532 | 0 | Py_INCREF(op); | 533 | 0 | } | 534 | 1 | } |
Unexecuted instantiation: signalmodule.c:_Py_XINCREF Unexecuted instantiation: _stat.c:_Py_XINCREF Unexecuted instantiation: timemodule.c:_Py_XINCREF Unexecuted instantiation: _threadmodule.c:_Py_XINCREF Unexecuted instantiation: _localemodule.c:_Py_XINCREF Unexecuted instantiation: _iomodule.c:_Py_XINCREF Unexecuted instantiation: iobase.c:_Py_XINCREF Unexecuted instantiation: fileio.c:_Py_XINCREF Unexecuted instantiation: bytesio.c:_Py_XINCREF Line | Count | Source | 530 | 235 | { | 531 | 235 | if (op != NULL) { | 532 | 235 | Py_INCREF(op); | 533 | 235 | } | 534 | 235 | } |
Unexecuted instantiation: textio.c:_Py_XINCREF Unexecuted instantiation: stringio.c:_Py_XINCREF Unexecuted instantiation: faulthandler.c:_Py_XINCREF Unexecuted instantiation: _tracemalloc.c:_Py_XINCREF Unexecuted instantiation: hashtable.c:_Py_XINCREF Unexecuted instantiation: symtablemodule.c:_Py_XINCREF Unexecuted instantiation: xxsubtype.c:_Py_XINCREF Unexecuted instantiation: frozen.c:_Py_XINCREF Unexecuted instantiation: getbuildinfo.c:_Py_XINCREF Unexecuted instantiation: acceler.c:_Py_XINCREF Unexecuted instantiation: grammar1.c:_Py_XINCREF Unexecuted instantiation: node.c:_Py_XINCREF Unexecuted instantiation: token.c:_Py_XINCREF Unexecuted instantiation: parsetok.c:_Py_XINCREF Unexecuted instantiation: tokenizer.c:_Py_XINCREF Unexecuted instantiation: accu.c:_Py_XINCREF Unexecuted instantiation: bytes_methods.c:_Py_XINCREF Line | Count | Source | 530 | 557 | { | 531 | 557 | if (op != NULL) { | 532 | 309 | Py_INCREF(op); | 533 | 309 | } | 534 | 557 | } |
classobject.c:_Py_XINCREF Line | Count | Source | 530 | 8.03k | { | 531 | 8.03k | if (op != NULL) { | 532 | 8.03k | Py_INCREF(op); | 533 | 8.03k | } | 534 | 8.03k | } |
Unexecuted instantiation: codeobject.c:_Py_XINCREF Unexecuted instantiation: complexobject.c:_Py_XINCREF descrobject.c:_Py_XINCREF Line | Count | Source | 530 | 29.2k | { | 531 | 29.2k | if (op != NULL) { | 532 | 29.0k | Py_INCREF(op); | 533 | 29.0k | } | 534 | 29.2k | } |
Unexecuted instantiation: enumobject.c:_Py_XINCREF Line | Count | Source | 530 | 1.04k | { | 531 | 1.04k | if (op != NULL) { | 532 | 1.04k | Py_INCREF(op); | 533 | 1.04k | } | 534 | 1.04k | } |
Unexecuted instantiation: fileobject.c:_Py_XINCREF Unexecuted instantiation: interpreteridobject.c:_Py_XINCREF Unexecuted instantiation: odictobject.c:_Py_XINCREF Unexecuted instantiation: namespaceobject.c:_Py_XINCREF Unexecuted instantiation: Python-ast.c:_Py_XINCREF Unexecuted instantiation: asdl.c:_Py_XINCREF Unexecuted instantiation: ast.c:_Py_XINCREF Unexecuted instantiation: ast_opt.c:_Py_XINCREF Unexecuted instantiation: ast_unparse.c:_Py_XINCREF bltinmodule.c:_Py_XINCREF Line | Count | Source | 530 | 160 | { | 531 | 160 | if (op != NULL) { | 532 | 160 | Py_INCREF(op); | 533 | 160 | } | 534 | 160 | } |
Unexecuted instantiation: context.c:_Py_XINCREF Unexecuted instantiation: getcompiler.c:_Py_XINCREF Unexecuted instantiation: getcopyright.c:_Py_XINCREF Unexecuted instantiation: getplatform.c:_Py_XINCREF Unexecuted instantiation: hamt.c:_Py_XINCREF Unexecuted instantiation: mystrtoul.c:_Py_XINCREF structmember.c:_Py_XINCREF Line | Count | Source | 530 | 978 | { | 531 | 978 | if (op != NULL) { | 532 | 978 | Py_INCREF(op); | 533 | 978 | } | 534 | 978 | } |
Unexecuted instantiation: parser.c:_Py_XINCREF Unexecuted instantiation: myreadline.c:_Py_XINCREF |
535 | | |
536 | 158k | #define Py_XINCREF(op) _Py_XINCREF(_PyObject_CAST(op)) |
537 | | |
538 | | static inline void _Py_XDECREF(PyObject *op) |
539 | 1.47M | { |
540 | 1.47M | if (op != NULL) { |
541 | 944k | Py_DECREF(op); |
542 | 944k | } |
543 | 1.47M | } Unexecuted instantiation: abstract.c:_Py_XDECREF Unexecuted instantiation: boolobject.c:_Py_XDECREF bytearrayobject.c:_Py_XDECREF Line | Count | Source | 539 | 14 | { | 540 | 14 | if (op != NULL) { | 541 | 14 | Py_DECREF(op); | 542 | 14 | } | 543 | 14 | } |
bytesobject.c:_Py_XDECREF Line | Count | Source | 539 | 15 | { | 540 | 15 | if (op != NULL) { | 541 | 14 | Py_DECREF(op); | 542 | 14 | } | 543 | 15 | } |
Unexecuted instantiation: call.c:_Py_XDECREF Unexecuted instantiation: capsule.c:_Py_XDECREF Line | Count | Source | 539 | 8.92k | { | 540 | 8.92k | if (op != NULL) { | 541 | 3.68k | Py_DECREF(op); | 542 | 3.68k | } | 543 | 8.92k | } |
Unexecuted instantiation: floatobject.c:_Py_XDECREF frameobject.c:_Py_XDECREF Line | Count | Source | 539 | 39.7k | { | 540 | 39.7k | if (op != NULL) { | 541 | 36.8k | Py_DECREF(op); | 542 | 36.8k | } | 543 | 39.7k | } |
Line | Count | Source | 539 | 1.02k | { | 540 | 1.02k | if (op != NULL) { | 541 | 299 | Py_DECREF(op); | 542 | 299 | } | 543 | 1.02k | } |
Line | Count | Source | 539 | 67 | { | 540 | 67 | if (op != NULL) { | 541 | 0 | Py_DECREF(op); | 542 | 0 | } | 543 | 67 | } |
Line | Count | Source | 539 | 89.6k | { | 540 | 89.6k | if (op != NULL) { | 541 | 88.7k | Py_DECREF(op); | 542 | 88.7k | } | 543 | 89.6k | } |
Unexecuted instantiation: longobject.c:_Py_XDECREF Line | Count | Source | 539 | 405k | { | 540 | 405k | if (op != NULL) { | 541 | 390k | Py_DECREF(op); | 542 | 390k | } | 543 | 405k | } |
Unexecuted instantiation: memoryobject.c:_Py_XDECREF methodobject.c:_Py_XDECREF Line | Count | Source | 539 | 17.6k | { | 540 | 17.6k | if (op != NULL) { | 541 | 8.84k | Py_DECREF(op); | 542 | 8.84k | } | 543 | 17.6k | } |
moduleobject.c:_Py_XDECREF Line | Count | Source | 539 | 2.21k | { | 540 | 2.21k | if (op != NULL) { | 541 | 1.70k | Py_DECREF(op); | 542 | 1.70k | } | 543 | 2.21k | } |
Line | Count | Source | 539 | 118k | { | 540 | 118k | if (op != NULL) { | 541 | 21.6k | Py_DECREF(op); | 542 | 21.6k | } | 543 | 118k | } |
Unexecuted instantiation: obmalloc.c:_Py_XDECREF Unexecuted instantiation: picklebufobject.c:_Py_XDECREF rangeobject.c:_Py_XDECREF Line | Count | Source | 539 | 56 | { | 540 | 56 | if (op != NULL) { | 541 | 56 | Py_DECREF(op); | 542 | 56 | } | 543 | 56 | } |
Line | Count | Source | 539 | 489 | { | 540 | 489 | if (op != NULL) { | 541 | 14 | Py_DECREF(op); | 542 | 14 | } | 543 | 489 | } |
Unexecuted instantiation: sliceobject.c:_Py_XDECREF Line | Count | Source | 539 | 16.2k | { | 540 | 16.2k | if (op != NULL) { | 541 | 16.2k | Py_DECREF(op); | 542 | 16.2k | } | 543 | 16.2k | } |
tupleobject.c:_Py_XDECREF Line | Count | Source | 539 | 154k | { | 540 | 154k | if (op != NULL) { | 541 | 151k | Py_DECREF(op); | 542 | 151k | } | 543 | 154k | } |
Line | Count | Source | 539 | 88.4k | { | 540 | 88.4k | if (op != NULL) { | 541 | 10.7k | Py_DECREF(op); | 542 | 10.7k | } | 543 | 88.4k | } |
unicodeobject.c:_Py_XDECREF Line | Count | Source | 539 | 130k | { | 540 | 130k | if (op != NULL) { | 541 | 2.53k | Py_DECREF(op); | 542 | 2.53k | } | 543 | 130k | } |
Unexecuted instantiation: unicodectype.c:_Py_XDECREF Unexecuted instantiation: weakrefobject.c:_Py_XDECREF Unexecuted instantiation: _warnings.c:_Py_XDECREF Line | Count | Source | 539 | 122k | { | 540 | 122k | if (op != NULL) { | 541 | 43.8k | Py_DECREF(op); | 542 | 43.8k | } | 543 | 122k | } |
Unexecuted instantiation: codecs.c:_Py_XDECREF Line | Count | Source | 539 | 214 | { | 540 | 214 | if (op != NULL) { | 541 | 192 | Py_DECREF(op); | 542 | 192 | } | 543 | 214 | } |
Line | Count | Source | 539 | 112k | { | 540 | 112k | if (op != NULL) { | 541 | 19.0k | Py_DECREF(op); | 542 | 19.0k | } | 543 | 112k | } |
Unexecuted instantiation: future.c:_Py_XDECREF Unexecuted instantiation: getargs.c:_Py_XDECREF Unexecuted instantiation: getversion.c:_Py_XDECREF Line | Count | Source | 539 | 8.08k | { | 540 | 8.08k | if (op != NULL) { | 541 | 6.07k | Py_DECREF(op); | 542 | 6.07k | } | 543 | 8.08k | } |
Unexecuted instantiation: importdl.c:_Py_XDECREF Unexecuted instantiation: initconfig.c:_Py_XDECREF Line | Count | Source | 539 | 99.0k | { | 540 | 99.0k | if (op != NULL) { | 541 | 99.0k | Py_DECREF(op); | 542 | 99.0k | } | 543 | 99.0k | } |
Unexecuted instantiation: modsupport.c:_Py_XDECREF Unexecuted instantiation: mysnprintf.c:_Py_XDECREF Unexecuted instantiation: pathconfig.c:_Py_XDECREF Unexecuted instantiation: peephole.c:_Py_XDECREF Unexecuted instantiation: preconfig.c:_Py_XDECREF Unexecuted instantiation: pyarena.c:_Py_XDECREF Unexecuted instantiation: pyctype.c:_Py_XDECREF Unexecuted instantiation: pyhash.c:_Py_XDECREF pylifecycle.c:_Py_XDECREF Line | Count | Source | 539 | 42 | { | 540 | 42 | if (op != NULL) { | 541 | 42 | Py_DECREF(op); | 542 | 42 | } | 543 | 42 | } |
Unexecuted instantiation: pymath.c:_Py_XDECREF Unexecuted instantiation: pystate.c:_Py_XDECREF Unexecuted instantiation: pythonrun.c:_Py_XDECREF Unexecuted instantiation: pytime.c:_Py_XDECREF Unexecuted instantiation: bootstrap_hash.c:_Py_XDECREF Line | Count | Source | 539 | 312 | { | 540 | 312 | if (op != NULL) { | 541 | 290 | Py_DECREF(op); | 542 | 290 | } | 543 | 312 | } |
Unexecuted instantiation: sysmodule.c:_Py_XDECREF Unexecuted instantiation: thread.c:_Py_XDECREF Line | Count | Source | 539 | 10.6k | { | 540 | 10.6k | if (op != NULL) { | 541 | 4.23k | Py_DECREF(op); | 542 | 4.23k | } | 543 | 10.6k | } |
Unexecuted instantiation: getopt.c:_Py_XDECREF Unexecuted instantiation: pystrcmp.c:_Py_XDECREF Unexecuted instantiation: pystrtod.c:_Py_XDECREF Unexecuted instantiation: pystrhex.c:_Py_XDECREF Unexecuted instantiation: dtoa.c:_Py_XDECREF Unexecuted instantiation: formatter_unicode.c:_Py_XDECREF Unexecuted instantiation: fileutils.c:_Py_XDECREF Unexecuted instantiation: dynload_shlib.c:_Py_XDECREF Unexecuted instantiation: config.c:_Py_XDECREF Unexecuted instantiation: getpath.c:_Py_XDECREF Unexecuted instantiation: gcmodule.c:_Py_XDECREF posixmodule.c:_Py_XDECREF Line | Count | Source | 539 | 12.8k | { | 540 | 12.8k | if (op != NULL) { | 541 | 5.12k | Py_DECREF(op); | 542 | 5.12k | } | 543 | 12.8k | } |
Unexecuted instantiation: errnomodule.c:_Py_XDECREF Unexecuted instantiation: pwdmodule.c:_Py_XDECREF Line | Count | Source | 539 | 20 | { | 540 | 20 | if (op != NULL) { | 541 | 12 | Py_DECREF(op); | 542 | 12 | } | 543 | 20 | } |
Unexecuted instantiation: _codecsmodule.c:_Py_XDECREF Unexecuted instantiation: _weakref.c:_Py_XDECREF _functoolsmodule.c:_Py_XDECREF Line | Count | Source | 539 | 4 | { | 540 | 4 | if (op != NULL) { | 541 | 3 | Py_DECREF(op); | 542 | 3 | } | 543 | 4 | } |
Unexecuted instantiation: _operator.c:_Py_XDECREF _collectionsmodule.c:_Py_XDECREF Line | Count | Source | 539 | 1 | { | 540 | 1 | if (op != NULL) { | 541 | 1 | Py_DECREF(op); | 542 | 1 | } | 543 | 1 | } |
Line | Count | Source | 539 | 1.95k | { | 540 | 1.95k | if (op != NULL) { | 541 | 1.72k | Py_DECREF(op); | 542 | 1.72k | } | 543 | 1.95k | } |
itertoolsmodule.c:_Py_XDECREF Line | Count | Source | 539 | 85 | { | 540 | 85 | if (op != NULL) { | 541 | 84 | Py_DECREF(op); | 542 | 84 | } | 543 | 85 | } |
Unexecuted instantiation: atexitmodule.c:_Py_XDECREF Unexecuted instantiation: signalmodule.c:_Py_XDECREF Unexecuted instantiation: _stat.c:_Py_XDECREF Unexecuted instantiation: timemodule.c:_Py_XDECREF Unexecuted instantiation: _threadmodule.c:_Py_XDECREF Unexecuted instantiation: _localemodule.c:_Py_XDECREF Unexecuted instantiation: _iomodule.c:_Py_XDECREF Line | Count | Source | 539 | 709 | { | 540 | 709 | if (op != NULL) { | 541 | 0 | Py_DECREF(op); | 542 | 0 | } | 543 | 709 | } |
Unexecuted instantiation: fileio.c:_Py_XDECREF Unexecuted instantiation: bytesio.c:_Py_XDECREF Line | Count | Source | 539 | 986 | { | 540 | 986 | if (op != NULL) { | 541 | 237 | Py_DECREF(op); | 542 | 237 | } | 543 | 986 | } |
Line | Count | Source | 539 | 134 | { | 540 | 134 | if (op != NULL) { | 541 | 74 | Py_DECREF(op); | 542 | 74 | } | 543 | 134 | } |
Unexecuted instantiation: stringio.c:_Py_XDECREF Unexecuted instantiation: faulthandler.c:_Py_XDECREF Unexecuted instantiation: _tracemalloc.c:_Py_XDECREF Unexecuted instantiation: hashtable.c:_Py_XDECREF Unexecuted instantiation: symtablemodule.c:_Py_XDECREF Unexecuted instantiation: xxsubtype.c:_Py_XDECREF Unexecuted instantiation: frozen.c:_Py_XDECREF Unexecuted instantiation: getbuildinfo.c:_Py_XDECREF Unexecuted instantiation: acceler.c:_Py_XDECREF Unexecuted instantiation: grammar1.c:_Py_XDECREF Unexecuted instantiation: node.c:_Py_XDECREF Unexecuted instantiation: token.c:_Py_XDECREF Unexecuted instantiation: parsetok.c:_Py_XDECREF Line | Count | Source | 539 | 48 | { | 540 | 48 | if (op != NULL) { | 541 | 16 | Py_DECREF(op); | 542 | 16 | } | 543 | 48 | } |
Unexecuted instantiation: accu.c:_Py_XDECREF Unexecuted instantiation: bytes_methods.c:_Py_XDECREF Line | Count | Source | 539 | 257 | { | 540 | 257 | if (op != NULL) { | 541 | 171 | Py_DECREF(op); | 542 | 171 | } | 543 | 257 | } |
classobject.c:_Py_XDECREF Line | Count | Source | 539 | 8.03k | { | 540 | 8.03k | if (op != NULL) { | 541 | 8.03k | Py_DECREF(op); | 542 | 8.03k | } | 543 | 8.03k | } |
Line | Count | Source | 539 | 19.6k | { | 540 | 19.6k | if (op != NULL) { | 541 | 19.6k | Py_DECREF(op); | 542 | 19.6k | } | 543 | 19.6k | } |
Unexecuted instantiation: complexobject.c:_Py_XDECREF descrobject.c:_Py_XDECREF Line | Count | Source | 539 | 1.99k | { | 540 | 1.99k | if (op != NULL) { | 541 | 1.03k | Py_DECREF(op); | 542 | 1.03k | } | 543 | 1.99k | } |
Line | Count | Source | 539 | 15 | { | 540 | 15 | if (op != NULL) { | 541 | 10 | Py_DECREF(op); | 542 | 10 | } | 543 | 15 | } |
Line | Count | Source | 539 | 1.39k | { | 540 | 1.39k | if (op != NULL) { | 541 | 14 | Py_DECREF(op); | 542 | 14 | } | 543 | 1.39k | } |
Unexecuted instantiation: fileobject.c:_Py_XDECREF Unexecuted instantiation: interpreteridobject.c:_Py_XDECREF Unexecuted instantiation: odictobject.c:_Py_XDECREF Unexecuted instantiation: namespaceobject.c:_Py_XDECREF Unexecuted instantiation: Python-ast.c:_Py_XDECREF Unexecuted instantiation: asdl.c:_Py_XDECREF Unexecuted instantiation: ast_opt.c:_Py_XDECREF Unexecuted instantiation: ast_unparse.c:_Py_XDECREF bltinmodule.c:_Py_XDECREF Line | Count | Source | 539 | 3.11k | { | 540 | 3.11k | if (op != NULL) { | 541 | 1.91k | Py_DECREF(op); | 542 | 1.91k | } | 543 | 3.11k | } |
Unexecuted instantiation: context.c:_Py_XDECREF Unexecuted instantiation: getcompiler.c:_Py_XDECREF Unexecuted instantiation: getcopyright.c:_Py_XDECREF Unexecuted instantiation: getplatform.c:_Py_XDECREF Unexecuted instantiation: hamt.c:_Py_XDECREF Unexecuted instantiation: mystrtoul.c:_Py_XDECREF structmember.c:_Py_XDECREF Line | Count | Source | 539 | 474 | { | 540 | 474 | if (op != NULL) { | 541 | 334 | Py_DECREF(op); | 542 | 334 | } | 543 | 474 | } |
Unexecuted instantiation: parser.c:_Py_XDECREF Unexecuted instantiation: myreadline.c:_Py_XDECREF |
544 | | |
545 | 1.47M | #define Py_XDECREF(op) _Py_XDECREF(_PyObject_CAST(op)) |
546 | | |
547 | | /* |
548 | | These are provided as conveniences to Python runtime embedders, so that |
549 | | they can have object code that is not dependent on Python compilation flags. |
550 | | */ |
551 | | PyAPI_FUNC(void) Py_IncRef(PyObject *); |
552 | | PyAPI_FUNC(void) Py_DecRef(PyObject *); |
553 | | |
554 | | /* |
555 | | _Py_NoneStruct is an object of undefined type which can be used in contexts |
556 | | where NULL (nil) is not suitable (since NULL often means 'error'). |
557 | | |
558 | | Don't forget to apply Py_INCREF() when returning this value!!! |
559 | | */ |
560 | | PyAPI_DATA(PyObject) _Py_NoneStruct; /* Don't use this directly */ |
561 | 262k | #define Py_None (&_Py_NoneStruct) |
562 | | |
563 | | /* Macro for returning Py_None from a function */ |
564 | 13.2k | #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None |
565 | | |
566 | | /* |
567 | | Py_NotImplemented is a singleton used to signal that an operation is |
568 | | not implemented for a given type combination. |
569 | | */ |
570 | | PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */ |
571 | 151k | #define Py_NotImplemented (&_Py_NotImplementedStruct) |
572 | | |
573 | | /* Macro for returning Py_NotImplemented from a function */ |
574 | | #define Py_RETURN_NOTIMPLEMENTED \ |
575 | 798 | return Py_INCREF(Py_NotImplemented), Py_NotImplemented |
576 | | |
577 | | /* Rich comparison opcodes */ |
578 | 1.93k | #define Py_LT 0 |
579 | 500 | #define Py_LE 1 |
580 | 342k | #define Py_EQ 2 |
581 | 122k | #define Py_NE 3 |
582 | 1.82k | #define Py_GT 4 |
583 | 2.69k | #define Py_GE 5 |
584 | | |
585 | | /* |
586 | | * Macro for implementing rich comparisons |
587 | | * |
588 | | * Needs to be a macro because any C-comparable type can be used. |
589 | | */ |
590 | | #define Py_RETURN_RICHCOMPARE(val1, val2, op) \ |
591 | 8.33k | do { \ |
592 | 8.33k | switch (op) { \ |
593 | 3.38k | case Py_EQ: if ((val1) == (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
594 | 3.38k | case Py_NE: if ((val1) != (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
595 | 1.39k | case Py_LT: if ((val1) < (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
596 | 814 | case Py_GT: if ((val1) > (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
597 | 814 | case Py_LE: if ((val1) <= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
598 | 2.15k | case Py_GE: if ((val1) >= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
599 | 2.15k | default: \ |
600 | 0 | Py_UNREACHABLE(); \ |
601 | 8.33k | } \ |
602 | 8.33k | } while (0) |
603 | | |
604 | | |
605 | | /* |
606 | | More conventions |
607 | | ================ |
608 | | |
609 | | Argument Checking |
610 | | ----------------- |
611 | | |
612 | | Functions that take objects as arguments normally don't check for nil |
613 | | arguments, but they do check the type of the argument, and return an |
614 | | error if the function doesn't apply to the type. |
615 | | |
616 | | Failure Modes |
617 | | ------------- |
618 | | |
619 | | Functions may fail for a variety of reasons, including running out of |
620 | | memory. This is communicated to the caller in two ways: an error string |
621 | | is set (see errors.h), and the function result differs: functions that |
622 | | normally return a pointer return NULL for failure, functions returning |
623 | | an integer return -1 (which could be a legal return value too!), and |
624 | | other functions return 0 for success and -1 for failure. |
625 | | Callers should always check for errors before using the result. If |
626 | | an error was set, the caller must either explicitly clear it, or pass |
627 | | the error on to its caller. |
628 | | |
629 | | Reference Counts |
630 | | ---------------- |
631 | | |
632 | | It takes a while to get used to the proper usage of reference counts. |
633 | | |
634 | | Functions that create an object set the reference count to 1; such new |
635 | | objects must be stored somewhere or destroyed again with Py_DECREF(). |
636 | | Some functions that 'store' objects, such as PyTuple_SetItem() and |
637 | | PyList_SetItem(), |
638 | | don't increment the reference count of the object, since the most |
639 | | frequent use is to store a fresh object. Functions that 'retrieve' |
640 | | objects, such as PyTuple_GetItem() and PyDict_GetItemString(), also |
641 | | don't increment |
642 | | the reference count, since most frequently the object is only looked at |
643 | | quickly. Thus, to retrieve an object and store it again, the caller |
644 | | must call Py_INCREF() explicitly. |
645 | | |
646 | | NOTE: functions that 'consume' a reference count, like |
647 | | PyList_SetItem(), consume the reference even if the object wasn't |
648 | | successfully stored, to simplify error handling. |
649 | | |
650 | | It seems attractive to make other functions that take an object as |
651 | | argument consume a reference count; however, this may quickly get |
652 | | confusing (even the current practice is already confusing). Consider |
653 | | it carefully, it may save lots of calls to Py_INCREF() and Py_DECREF() at |
654 | | times. |
655 | | */ |
656 | | |
657 | | |
658 | | /* Trashcan mechanism, thanks to Christian Tismer. |
659 | | |
660 | | When deallocating a container object, it's possible to trigger an unbounded |
661 | | chain of deallocations, as each Py_DECREF in turn drops the refcount on "the |
662 | | next" object in the chain to 0. This can easily lead to stack overflows, |
663 | | especially in threads (which typically have less stack space to work with). |
664 | | |
665 | | A container object can avoid this by bracketing the body of its tp_dealloc |
666 | | function with a pair of macros: |
667 | | |
668 | | static void |
669 | | mytype_dealloc(mytype *p) |
670 | | { |
671 | | ... declarations go here ... |
672 | | |
673 | | PyObject_GC_UnTrack(p); // must untrack first |
674 | | Py_TRASHCAN_BEGIN(p, mytype_dealloc) |
675 | | ... The body of the deallocator goes here, including all calls ... |
676 | | ... to Py_DECREF on contained objects. ... |
677 | | Py_TRASHCAN_END // there should be no code after this |
678 | | } |
679 | | |
680 | | CAUTION: Never return from the middle of the body! If the body needs to |
681 | | "get out early", put a label immediately before the Py_TRASHCAN_END |
682 | | call, and goto it. Else the call-depth counter (see below) will stay |
683 | | above 0 forever, and the trashcan will never get emptied. |
684 | | |
685 | | How it works: The BEGIN macro increments a call-depth counter. So long |
686 | | as this counter is small, the body of the deallocator is run directly without |
687 | | further ado. But if the counter gets large, it instead adds p to a list of |
688 | | objects to be deallocated later, skips the body of the deallocator, and |
689 | | resumes execution after the END macro. The tp_dealloc routine then returns |
690 | | without deallocating anything (and so unbounded call-stack depth is avoided). |
691 | | |
692 | | When the call stack finishes unwinding again, code generated by the END macro |
693 | | notices this, and calls another routine to deallocate all the objects that |
694 | | may have been added to the list of deferred deallocations. In effect, a |
695 | | chain of N deallocations is broken into (N-1)/(PyTrash_UNWIND_LEVEL-1) pieces, |
696 | | with the call stack never exceeding a depth of PyTrash_UNWIND_LEVEL. |
697 | | |
698 | | Since the tp_dealloc of a subclass typically calls the tp_dealloc of the base |
699 | | class, we need to ensure that the trashcan is only triggered on the tp_dealloc |
700 | | of the actual class being deallocated. Otherwise we might end up with a |
701 | | partially-deallocated object. To check this, the tp_dealloc function must be |
702 | | passed as second argument to Py_TRASHCAN_BEGIN(). |
703 | | */ |
704 | | |
705 | | /* The new thread-safe private API, invoked by the macros below. */ |
706 | | PyAPI_FUNC(void) _PyTrash_thread_deposit_object(PyObject*); |
707 | | PyAPI_FUNC(void) _PyTrash_thread_destroy_chain(void); |
708 | | |
709 | 111k | #define PyTrash_UNWIND_LEVEL 50 |
710 | | |
711 | | #define Py_TRASHCAN_BEGIN_CONDITION(op, cond) \ |
712 | 111k | do { \ |
713 | 111k | PyThreadState *_tstate = NULL; \ |
714 | 111k | /* If "cond" is false, then _tstate remains NULL and the deallocator \ |
715 | 111k | * is run normally without involving the trashcan */ \ |
716 | 111k | if (cond) { \ |
717 | 111k | _tstate = PyThreadState_GET(); \ |
718 | 111k | if (_tstate->trash_delete_nesting >= PyTrash_UNWIND_LEVEL) { \ |
719 | 0 | /* Store the object (to be deallocated later) and jump past \ |
720 | 0 | * Py_TRASHCAN_END, skipping the body of the deallocator */ \ |
721 | 0 | _PyTrash_thread_deposit_object(_PyObject_CAST(op)); \ |
722 | 0 | break; \ |
723 | 0 | } \ |
724 | 111k | ++_tstate->trash_delete_nesting; \ |
725 | 111k | } |
726 | | /* The body of the deallocator is here. */ |
727 | | #define Py_TRASHCAN_END \ |
728 | 111k | if (_tstate) { \ |
729 | 111k | --_tstate->trash_delete_nesting; \ |
730 | 111k | if (_tstate->trash_delete_later && _tstate->trash_delete_nesting <= 0) \ |
731 | 111k | _PyTrash_thread_destroy_chain(); \ |
732 | 111k | } \ |
733 | 111k | } while (0); |
734 | | |
735 | 71.9k | #define Py_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_BEGIN_CONDITION(op, \ |
736 | 71.9k | Py_TYPE(op)->tp_dealloc == (destructor)(dealloc)) |
737 | | |
738 | | /* For backwards compatibility, these macros enable the trashcan |
739 | | * unconditionally */ |
740 | 39.7k | #define Py_TRASHCAN_SAFE_BEGIN(op) Py_TRASHCAN_BEGIN_CONDITION(op, 1) |
741 | 39.7k | #define Py_TRASHCAN_SAFE_END(op) Py_TRASHCAN_END |
742 | | |
743 | | |
744 | | #ifndef Py_LIMITED_API |
745 | | # define Py_CPYTHON_OBJECT_H |
746 | | # include "cpython/object.h" |
747 | | # undef Py_CPYTHON_OBJECT_H |
748 | | #endif |
749 | | |
750 | | #ifdef __cplusplus |
751 | | } |
752 | | #endif |
753 | | #endif /* !Py_OBJECT_H */ |