/src/Python-3.8.3/Include/object.h
Line | Count | Source |
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 | 16.8M | #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.88M | #define _PyVarObject_CAST(op) ((PyVarObject*)(op)) |
120 | | |
121 | 925k | #define Py_REFCNT(ob) (_PyObject_CAST(ob)->ob_refcnt) |
122 | 6.24M | #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type) |
123 | 1.65M | #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 | 45.7k | (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 | 102k | PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS) |
214 | 4.84k | #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 | 813k | #define Py_TPFLAGS_HEAPTYPE (1UL << 9) |
287 | | |
288 | | /* Set if the type allows subclassing */ |
289 | 4.47k | #define Py_TPFLAGS_BASETYPE (1UL << 10) |
290 | | |
291 | | /* Set if the type implements the vectorcall protocol (PEP 590) */ |
292 | | #ifndef Py_LIMITED_API |
293 | 12.5k | #define _Py_TPFLAGS_HAVE_VECTORCALL (1UL << 11) |
294 | | #endif |
295 | | |
296 | | /* Set if the type is 'ready' -- fully initialized */ |
297 | 8.95k | #define Py_TPFLAGS_READY (1UL << 12) |
298 | | |
299 | | /* Set while the type is being 'readied', to prevent recursive ready calls */ |
300 | 7.94k | #define Py_TPFLAGS_READYING (1UL << 13) |
301 | | |
302 | | /* Objects support garbage collection (see objimpl.h) */ |
303 | 31.4k | #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.48k | #define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION 0 |
310 | | #endif |
311 | | |
312 | | /* Objects behave like an unbound method */ |
313 | 3.95k | #define Py_TPFLAGS_METHOD_DESCRIPTOR (1UL << 17) |
314 | | |
315 | | /* Objects support type attribute cache */ |
316 | 1.48k | #define Py_TPFLAGS_HAVE_VERSION_TAG (1UL << 18) |
317 | 1.80k | #define Py_TPFLAGS_VALID_VERSION_TAG (1UL << 19) |
318 | | |
319 | | /* Type is abstract and cannot be instantiated */ |
320 | 3.14k | #define Py_TPFLAGS_IS_ABSTRACT (1UL << 20) |
321 | | |
322 | | /* These flags are used to determine if a type is a subclass. */ |
323 | 17 | #define Py_TPFLAGS_LONG_SUBCLASS (1UL << 24) |
324 | 2 | #define Py_TPFLAGS_LIST_SUBCLASS (1UL << 25) |
325 | 237 | #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 | 17 | #define Py_TPFLAGS_DICT_SUBCLASS (1UL << 29) |
329 | 878 | #define Py_TPFLAGS_BASE_EXC_SUBCLASS (1UL << 30) |
330 | 15 | #define Py_TPFLAGS_TYPE_SUBCLASS (1UL << 31) |
331 | | |
332 | 1.48k | #define Py_TPFLAGS_DEFAULT ( \ |
333 | 1.48k | Py_TPFLAGS_HAVE_STACKLESS_EXTENSION | \ |
334 | 1.48k | Py_TPFLAGS_HAVE_VERSION_TAG | \ |
335 | 1.48k | 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.35M | #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 | 743k | { |
438 | 743k | if (_Py_tracemalloc_config.tracing) { |
439 | 0 | _PyTraceMalloc_NewReference(op); |
440 | 0 | } |
441 | 743k | _Py_INC_TPALLOCS(op); |
442 | 743k | _Py_INC_REFTOTAL; |
443 | 743k | Py_REFCNT(op) = 1; |
444 | 743k | } 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 | 184k | { | 438 | 184k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 184k | _Py_INC_TPALLOCS(op); | 442 | 184k | _Py_INC_REFTOTAL; | 443 | 184k | Py_REFCNT(op) = 1; | 444 | 184k | } |
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.52k | { | 438 | 2.52k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 2.52k | _Py_INC_TPALLOCS(op); | 442 | 2.52k | _Py_INC_REFTOTAL; | 443 | 2.52k | Py_REFCNT(op) = 1; | 444 | 2.52k | } |
frameobject.c:_Py_NewReference Line | Count | Source | 437 | 33.9k | { | 438 | 33.9k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 33.9k | _Py_INC_TPALLOCS(op); | 442 | 33.9k | _Py_INC_REFTOTAL; | 443 | 33.9k | Py_REFCNT(op) = 1; | 444 | 33.9k | } |
Unexecuted instantiation: funcobject.c:_Py_NewReference Unexecuted instantiation: iterobject.c:_Py_NewReference listobject.c:_Py_NewReference Line | Count | Source | 437 | 5.79k | { | 438 | 5.79k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 5.79k | _Py_INC_TPALLOCS(op); | 442 | 5.79k | _Py_INC_REFTOTAL; | 443 | 5.79k | Py_REFCNT(op) = 1; | 444 | 5.79k | } |
longobject.c:_Py_NewReference Line | Count | Source | 437 | 30.2k | { | 438 | 30.2k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 30.2k | _Py_INC_TPALLOCS(op); | 442 | 30.2k | _Py_INC_REFTOTAL; | 443 | 30.2k | Py_REFCNT(op) = 1; | 444 | 30.2k | } |
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.28k | { | 438 | 8.28k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 8.28k | _Py_INC_TPALLOCS(op); | 442 | 8.28k | _Py_INC_REFTOTAL; | 443 | 8.28k | Py_REFCNT(op) = 1; | 444 | 8.28k | } |
Unexecuted instantiation: moduleobject.c:_Py_NewReference object.c:_Py_NewReference Line | Count | Source | 437 | 144k | { | 438 | 144k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 144k | _Py_INC_TPALLOCS(op); | 442 | 144k | _Py_INC_REFTOTAL; | 443 | 144k | Py_REFCNT(op) = 1; | 444 | 144k | } |
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.27k | { | 438 | 2.27k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 2.27k | _Py_INC_TPALLOCS(op); | 442 | 2.27k | _Py_INC_REFTOTAL; | 443 | 2.27k | Py_REFCNT(op) = 1; | 444 | 2.27k | } |
Unexecuted instantiation: structseq.c:_Py_NewReference tupleobject.c:_Py_NewReference Line | Count | Source | 437 | 45.3k | { | 438 | 45.3k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 45.3k | _Py_INC_TPALLOCS(op); | 442 | 45.3k | _Py_INC_REFTOTAL; | 443 | 45.3k | Py_REFCNT(op) = 1; | 444 | 45.3k | } |
typeobject.c:_Py_NewReference Line | Count | Source | 437 | 41.6k | { | 438 | 41.6k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 41.6k | _Py_INC_TPALLOCS(op); | 442 | 41.6k | _Py_INC_REFTOTAL; | 443 | 41.6k | Py_REFCNT(op) = 1; | 444 | 41.6k | } |
unicodeobject.c:_Py_NewReference Line | Count | Source | 437 | 142k | { | 438 | 142k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 142k | _Py_INC_TPALLOCS(op); | 442 | 142k | _Py_INC_REFTOTAL; | 443 | 142k | Py_REFCNT(op) = 1; | 444 | 142k | } |
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 | 83.2k | { | 438 | 83.2k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 83.2k | _Py_INC_TPALLOCS(op); | 442 | 83.2k | _Py_INC_REFTOTAL; | 443 | 83.2k | Py_REFCNT(op) = 1; | 444 | 83.2k | } |
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.42k | { | 438 | 7.42k | if (_Py_tracemalloc_config.tracing) { | 439 | 0 | _PyTraceMalloc_NewReference(op); | 440 | 0 | } | 441 | 7.42k | _Py_INC_TPALLOCS(op); | 442 | 7.42k | _Py_INC_REFTOTAL; | 443 | 7.42k | Py_REFCNT(op) = 1; | 444 | 7.42k | } |
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.56k | { |
448 | 6.56k | (void)op; /* may be unused, shut up -Wunused-parameter */ |
449 | 6.56k | _Py_INC_TPFREES(op); |
450 | 6.56k | } 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 | 277 | { | 448 | 277 | (void)op; /* may be unused, shut up -Wunused-parameter */ | 449 | 277 | _Py_INC_TPFREES(op); | 450 | 277 | } |
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.24k | { | 448 | 6.24k | (void)op; /* may be unused, shut up -Wunused-parameter */ | 449 | 6.24k | _Py_INC_TPFREES(op); | 450 | 6.24k | } |
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.16M | { |
458 | 3.16M | _Py_INC_REFTOTAL; |
459 | 3.16M | op->ob_refcnt++; |
460 | 3.16M | } Line | Count | Source | 457 | 29.2k | { | 458 | 29.2k | _Py_INC_REFTOTAL; | 459 | 29.2k | op->ob_refcnt++; | 460 | 29.2k | } |
Line | Count | Source | 457 | 103k | { | 458 | 103k | _Py_INC_REFTOTAL; | 459 | 103k | op->ob_refcnt++; | 460 | 103k | } |
bytearrayobject.c:_Py_INCREF Line | Count | Source | 457 | 21 | { | 458 | 21 | _Py_INC_REFTOTAL; | 459 | 21 | op->ob_refcnt++; | 460 | 21 | } |
Line | Count | Source | 457 | 69.2k | { | 458 | 69.2k | _Py_INC_REFTOTAL; | 459 | 69.2k | op->ob_refcnt++; | 460 | 69.2k | } |
Line | Count | Source | 457 | 37.2k | { | 458 | 37.2k | _Py_INC_REFTOTAL; | 459 | 37.2k | op->ob_refcnt++; | 460 | 37.2k | } |
Unexecuted instantiation: capsule.c:_Py_INCREF Line | Count | Source | 457 | 15.7k | { | 458 | 15.7k | _Py_INC_REFTOTAL; | 459 | 15.7k | op->ob_refcnt++; | 460 | 15.7k | } |
Unexecuted instantiation: floatobject.c:_Py_INCREF Line | Count | Source | 457 | 152k | { | 458 | 152k | _Py_INC_REFTOTAL; | 459 | 152k | op->ob_refcnt++; | 460 | 152k | } |
Line | Count | Source | 457 | 73.8k | { | 458 | 73.8k | _Py_INC_REFTOTAL; | 459 | 73.8k | op->ob_refcnt++; | 460 | 73.8k | } |
Line | Count | Source | 457 | 67 | { | 458 | 67 | _Py_INC_REFTOTAL; | 459 | 67 | op->ob_refcnt++; | 460 | 67 | } |
Line | Count | Source | 457 | 111k | { | 458 | 111k | _Py_INC_REFTOTAL; | 459 | 111k | op->ob_refcnt++; | 460 | 111k | } |
Line | Count | Source | 457 | 37.0k | { | 458 | 37.0k | _Py_INC_REFTOTAL; | 459 | 37.0k | op->ob_refcnt++; | 460 | 37.0k | } |
Line | Count | Source | 457 | 910k | { | 458 | 910k | _Py_INC_REFTOTAL; | 459 | 910k | op->ob_refcnt++; | 460 | 910k | } |
memoryobject.c:_Py_INCREF Line | Count | Source | 457 | 698 | { | 458 | 698 | _Py_INC_REFTOTAL; | 459 | 698 | op->ob_refcnt++; | 460 | 698 | } |
methodobject.c:_Py_INCREF Line | Count | Source | 457 | 20.6k | { | 458 | 20.6k | _Py_INC_REFTOTAL; | 459 | 20.6k | op->ob_refcnt++; | 460 | 20.6k | } |
moduleobject.c:_Py_INCREF Line | Count | Source | 457 | 4.04k | { | 458 | 4.04k | _Py_INC_REFTOTAL; | 459 | 4.04k | op->ob_refcnt++; | 460 | 4.04k | } |
Line | Count | Source | 457 | 305k | { | 458 | 305k | _Py_INC_REFTOTAL; | 459 | 305k | op->ob_refcnt++; | 460 | 305k | } |
Unexecuted instantiation: obmalloc.c:_Py_INCREF Unexecuted instantiation: picklebufobject.c:_Py_INCREF Line | Count | Source | 457 | 254 | { | 458 | 254 | _Py_INC_REFTOTAL; | 459 | 254 | op->ob_refcnt++; | 460 | 254 | } |
Line | Count | Source | 457 | 9.10k | { | 458 | 9.10k | _Py_INC_REFTOTAL; | 459 | 9.10k | op->ob_refcnt++; | 460 | 9.10k | } |
Line | Count | Source | 457 | 6.92k | { | 458 | 6.92k | _Py_INC_REFTOTAL; | 459 | 6.92k | op->ob_refcnt++; | 460 | 6.92k | } |
Line | Count | Source | 457 | 130 | { | 458 | 130 | _Py_INC_REFTOTAL; | 459 | 130 | op->ob_refcnt++; | 460 | 130 | } |
Line | Count | Source | 457 | 86.8k | { | 458 | 86.8k | _Py_INC_REFTOTAL; | 459 | 86.8k | op->ob_refcnt++; | 460 | 86.8k | } |
Line | Count | Source | 457 | 261k | { | 458 | 261k | _Py_INC_REFTOTAL; | 459 | 261k | op->ob_refcnt++; | 460 | 261k | } |
unicodeobject.c:_Py_INCREF Line | Count | Source | 457 | 66.3k | { | 458 | 66.3k | _Py_INC_REFTOTAL; | 459 | 66.3k | op->ob_refcnt++; | 460 | 66.3k | } |
Unexecuted instantiation: unicodectype.c:_Py_INCREF weakrefobject.c:_Py_INCREF Line | Count | Source | 457 | 3.06k | { | 458 | 3.06k | _Py_INC_REFTOTAL; | 459 | 3.06k | op->ob_refcnt++; | 460 | 3.06k | } |
Line | Count | Source | 457 | 78 | { | 458 | 78 | _Py_INC_REFTOTAL; | 459 | 78 | op->ob_refcnt++; | 460 | 78 | } |
Line | Count | Source | 457 | 532k | { | 458 | 532k | _Py_INC_REFTOTAL; | 459 | 532k | op->ob_refcnt++; | 460 | 532k | } |
Line | Count | Source | 457 | 130 | { | 458 | 130 | _Py_INC_REFTOTAL; | 459 | 130 | op->ob_refcnt++; | 460 | 130 | } |
Line | Count | Source | 457 | 1.15k | { | 458 | 1.15k | _Py_INC_REFTOTAL; | 459 | 1.15k | op->ob_refcnt++; | 460 | 1.15k | } |
Line | Count | Source | 457 | 18.5k | { | 458 | 18.5k | _Py_INC_REFTOTAL; | 459 | 18.5k | op->ob_refcnt++; | 460 | 18.5k | } |
Unexecuted instantiation: future.c:_Py_INCREF Unexecuted instantiation: getargs.c:_Py_INCREF Unexecuted instantiation: getversion.c:_Py_INCREF Line | Count | Source | 457 | 10.6k | { | 458 | 10.6k | _Py_INC_REFTOTAL; | 459 | 10.6k | op->ob_refcnt++; | 460 | 10.6k | } |
Unexecuted instantiation: importdl.c:_Py_INCREF Unexecuted instantiation: initconfig.c:_Py_INCREF Line | Count | Source | 457 | 119k | { | 458 | 119k | _Py_INC_REFTOTAL; | 459 | 119k | op->ob_refcnt++; | 460 | 119k | } |
Line | Count | Source | 457 | 4.11k | { | 458 | 4.11k | _Py_INC_REFTOTAL; | 459 | 4.11k | op->ob_refcnt++; | 460 | 4.11k | } |
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 | 39 | { | 458 | 39 | _Py_INC_REFTOTAL; | 459 | 39 | op->ob_refcnt++; | 460 | 39 | } |
Unexecuted instantiation: pymath.c:_Py_INCREF Line | Count | Source | 457 | 189 | { | 458 | 189 | _Py_INC_REFTOTAL; | 459 | 189 | op->ob_refcnt++; | 460 | 189 | } |
Unexecuted instantiation: pythonrun.c:_Py_INCREF Unexecuted instantiation: pytime.c:_Py_INCREF Unexecuted instantiation: bootstrap_hash.c:_Py_INCREF Line | Count | Source | 457 | 57 | { | 458 | 57 | _Py_INC_REFTOTAL; | 459 | 57 | op->ob_refcnt++; | 460 | 57 | } |
Line | Count | Source | 457 | 49 | { | 458 | 49 | _Py_INC_REFTOTAL; | 459 | 49 | op->ob_refcnt++; | 460 | 49 | } |
Unexecuted instantiation: thread.c:_Py_INCREF Line | Count | Source | 457 | 4.16k | { | 458 | 4.16k | _Py_INC_REFTOTAL; | 459 | 4.16k | op->ob_refcnt++; | 460 | 4.16k | } |
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 | 860 | { | 458 | 860 | _Py_INC_REFTOTAL; | 459 | 860 | op->ob_refcnt++; | 460 | 860 | } |
Line | Count | Source | 457 | 3.98k | { | 458 | 3.98k | _Py_INC_REFTOTAL; | 459 | 3.98k | op->ob_refcnt++; | 460 | 3.98k | } |
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 | 13 | { | 458 | 13 | _Py_INC_REFTOTAL; | 459 | 13 | op->ob_refcnt++; | 460 | 13 | } |
Line | Count | Source | 457 | 52 | { | 458 | 52 | _Py_INC_REFTOTAL; | 459 | 52 | op->ob_refcnt++; | 460 | 52 | } |
_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 | 4.95k | { | 458 | 4.95k | _Py_INC_REFTOTAL; | 459 | 4.95k | op->ob_refcnt++; | 460 | 4.95k | } |
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 | 13 | { | 458 | 13 | _Py_INC_REFTOTAL; | 459 | 13 | op->ob_refcnt++; | 460 | 13 | } |
_threadmodule.c:_Py_INCREF Line | Count | Source | 457 | 904 | { | 458 | 904 | _Py_INC_REFTOTAL; | 459 | 904 | op->ob_refcnt++; | 460 | 904 | } |
Unexecuted instantiation: _localemodule.c:_Py_INCREF Line | Count | Source | 457 | 234 | { | 458 | 234 | _Py_INC_REFTOTAL; | 459 | 234 | op->ob_refcnt++; | 460 | 234 | } |
Line | Count | Source | 457 | 926 | { | 458 | 926 | _Py_INC_REFTOTAL; | 459 | 926 | op->ob_refcnt++; | 460 | 926 | } |
Unexecuted instantiation: fileio.c:_Py_INCREF Unexecuted instantiation: bytesio.c:_Py_INCREF Line | Count | Source | 457 | 508 | { | 458 | 508 | _Py_INC_REFTOTAL; | 459 | 508 | op->ob_refcnt++; | 460 | 508 | } |
Line | Count | Source | 457 | 372 | { | 458 | 372 | _Py_INC_REFTOTAL; | 459 | 372 | op->ob_refcnt++; | 460 | 372 | } |
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 | 30 | { | 458 | 30 | _Py_INC_REFTOTAL; | 459 | 30 | op->ob_refcnt++; | 460 | 30 | } |
Unexecuted instantiation: tokenizer.c:_Py_INCREF Unexecuted instantiation: accu.c:_Py_INCREF Unexecuted instantiation: bytes_methods.c:_Py_INCREF Line | Count | Source | 457 | 290 | { | 458 | 290 | _Py_INC_REFTOTAL; | 459 | 290 | op->ob_refcnt++; | 460 | 290 | } |
Line | Count | Source | 457 | 15.0k | { | 458 | 15.0k | _Py_INC_REFTOTAL; | 459 | 15.0k | op->ob_refcnt++; | 460 | 15.0k | } |
Line | Count | Source | 457 | 93.2k | { | 458 | 93.2k | _Py_INC_REFTOTAL; | 459 | 93.2k | op->ob_refcnt++; | 460 | 93.2k | } |
Unexecuted instantiation: complexobject.c:_Py_INCREF Line | Count | Source | 457 | 29.8k | { | 458 | 29.8k | _Py_INC_REFTOTAL; | 459 | 29.8k | op->ob_refcnt++; | 460 | 29.8k | } |
Line | Count | Source | 457 | 82 | { | 458 | 82 | _Py_INC_REFTOTAL; | 459 | 82 | op->ob_refcnt++; | 460 | 82 | } |
Line | Count | Source | 457 | 2.56k | { | 458 | 2.56k | _Py_INC_REFTOTAL; | 459 | 2.56k | op->ob_refcnt++; | 460 | 2.56k | } |
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.18k | { | 458 | 6.18k | _Py_INC_REFTOTAL; | 459 | 6.18k | op->ob_refcnt++; | 460 | 6.18k | } |
Line | Count | Source | 457 | 13 | { | 458 | 13 | _Py_INC_REFTOTAL; | 459 | 13 | op->ob_refcnt++; | 460 | 13 | } |
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 | 5.91k | { | 458 | 5.91k | _Py_INC_REFTOTAL; | 459 | 5.91k | op->ob_refcnt++; | 460 | 5.91k | } |
Unexecuted instantiation: parser.c:_Py_INCREF Unexecuted instantiation: myreadline.c:_Py_INCREF |
461 | | |
462 | 3.16M | #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.87M | { |
467 | 2.87M | (void)filename; /* may be unused, shut up -Wunused-parameter */ |
468 | 2.87M | (void)lineno; /* may be unused, shut up -Wunused-parameter */ |
469 | 2.87M | _Py_DEC_REFTOTAL; |
470 | 2.87M | 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.37M | } |
477 | 503k | else { |
478 | 503k | _Py_Dealloc(op); |
479 | 503k | } |
480 | 2.87M | } Line | Count | Source | 466 | 21.8k | { | 467 | 21.8k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 21.8k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 21.8k | _Py_DEC_REFTOTAL; | 470 | 21.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 | 19.7k | } | 477 | 2.09k | else { | 478 | 2.09k | _Py_Dealloc(op); | 479 | 2.09k | } | 480 | 21.8k | } |
Unexecuted instantiation: boolobject.c:_Py_DECREF bytearrayobject.c:_Py_DECREF Line | Count | Source | 466 | 13 | { | 467 | 13 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 13 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 13 | _Py_DEC_REFTOTAL; | 470 | 13 | 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 | 13 | else { | 478 | 13 | _Py_Dealloc(op); | 479 | 13 | } | 480 | 13 | } |
Line | Count | Source | 466 | 641 | { | 467 | 641 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 641 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 641 | _Py_DEC_REFTOTAL; | 470 | 641 | 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 | 634 | } | 477 | 7 | else { | 478 | 7 | _Py_Dealloc(op); | 479 | 7 | } | 480 | 641 | } |
Line | Count | Source | 466 | 62.9k | { | 467 | 62.9k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 62.9k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 62.9k | _Py_DEC_REFTOTAL; | 470 | 62.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 | 20.4k | } | 477 | 42.4k | else { | 478 | 42.4k | _Py_Dealloc(op); | 479 | 42.4k | } | 480 | 62.9k | } |
Unexecuted instantiation: capsule.c:_Py_DECREF Line | Count | Source | 466 | 17.1k | { | 467 | 17.1k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 17.1k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 17.1k | _Py_DEC_REFTOTAL; | 470 | 17.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 | 12.6k | } | 477 | 4.45k | else { | 478 | 4.45k | _Py_Dealloc(op); | 479 | 4.45k | } | 480 | 17.1k | } |
Unexecuted instantiation: floatobject.c:_Py_DECREF 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 | 239k | } | 477 | 14.8k | else { | 478 | 14.8k | _Py_Dealloc(op); | 479 | 14.8k | } | 480 | 254k | } |
Line | Count | Source | 466 | 24.0k | { | 467 | 24.0k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 24.0k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 24.0k | _Py_DEC_REFTOTAL; | 470 | 24.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 | 23.5k | } | 477 | 564 | else { | 478 | 564 | _Py_Dealloc(op); | 479 | 564 | } | 480 | 24.0k | } |
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 | 101k | { | 467 | 101k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 101k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 101k | _Py_DEC_REFTOTAL; | 470 | 101k | 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 | 96.9k | } | 477 | 4.17k | else { | 478 | 4.17k | _Py_Dealloc(op); | 479 | 4.17k | } | 480 | 101k | } |
Line | Count | Source | 466 | 7.00k | { | 467 | 7.00k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 7.00k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 7.00k | _Py_DEC_REFTOTAL; | 470 | 7.00k | 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.12k | } | 477 | 1.88k | else { | 478 | 1.88k | _Py_Dealloc(op); | 479 | 1.88k | } | 480 | 7.00k | } |
Line | Count | Source | 466 | 634k | { | 467 | 634k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 634k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 634k | _Py_DEC_REFTOTAL; | 470 | 634k | 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 | 380k | } | 477 | 253k | else { | 478 | 253k | _Py_Dealloc(op); | 479 | 253k | } | 480 | 634k | } |
memoryobject.c:_Py_DECREF Line | Count | Source | 466 | 702 | { | 467 | 702 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 702 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 702 | _Py_DEC_REFTOTAL; | 470 | 702 | 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 | 463 | } | 477 | 239 | else { | 478 | 239 | _Py_Dealloc(op); | 479 | 239 | } | 480 | 702 | } |
methodobject.c:_Py_DECREF Line | Count | Source | 466 | 8.28k | { | 467 | 8.28k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 8.28k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 8.28k | _Py_DEC_REFTOTAL; | 470 | 8.28k | 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.10k | } | 477 | 177 | else { | 478 | 177 | _Py_Dealloc(op); | 479 | 177 | } | 480 | 8.28k | } |
moduleobject.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 | 10.3k | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 10.3k | } |
Line | Count | Source | 466 | 317k | { | 467 | 317k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 317k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 317k | _Py_DEC_REFTOTAL; | 470 | 317k | 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 | 317k | } | 477 | 26 | else { | 478 | 26 | _Py_Dealloc(op); | 479 | 26 | } | 480 | 317k | } |
Unexecuted instantiation: obmalloc.c:_Py_DECREF Unexecuted instantiation: picklebufobject.c:_Py_DECREF Line | Count | Source | 466 | 1.12k | { | 467 | 1.12k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.12k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.12k | _Py_DEC_REFTOTAL; | 470 | 1.12k | 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.04k | } | 477 | 84 | else { | 478 | 84 | _Py_Dealloc(op); | 479 | 84 | } | 480 | 1.12k | } |
Line | Count | Source | 466 | 5.60k | { | 467 | 5.60k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 5.60k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 5.60k | _Py_DEC_REFTOTAL; | 470 | 5.60k | 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.36k | } | 477 | 240 | else { | 478 | 240 | _Py_Dealloc(op); | 479 | 240 | } | 480 | 5.60k | } |
Line | Count | Source | 466 | 6.92k | { | 467 | 6.92k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 6.92k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 6.92k | _Py_DEC_REFTOTAL; | 470 | 6.92k | 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.38k | } | 477 | 540 | else { | 478 | 540 | _Py_Dealloc(op); | 479 | 540 | } | 480 | 6.92k | } |
Line | Count | Source | 466 | 16.7k | { | 467 | 16.7k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 16.7k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 16.7k | _Py_DEC_REFTOTAL; | 470 | 16.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 | 6.25k | } | 477 | 10.5k | else { | 478 | 10.5k | _Py_Dealloc(op); | 479 | 10.5k | } | 480 | 16.7k | } |
Line | Count | Source | 466 | 149k | { | 467 | 149k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 149k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 149k | _Py_DEC_REFTOTAL; | 470 | 149k | 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 | 136k | } | 477 | 12.7k | else { | 478 | 12.7k | _Py_Dealloc(op); | 479 | 12.7k | } | 480 | 149k | } |
Line | Count | Source | 466 | 238k | { | 467 | 238k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 238k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 238k | _Py_DEC_REFTOTAL; | 470 | 238k | 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 | 230k | } | 477 | 7.46k | else { | 478 | 7.46k | _Py_Dealloc(op); | 479 | 7.46k | } | 480 | 238k | } |
unicodeobject.c:_Py_DECREF Line | Count | Source | 466 | 61.3k | { | 467 | 61.3k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 61.3k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 61.3k | _Py_DEC_REFTOTAL; | 470 | 61.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 | 10.1k | } | 477 | 51.2k | else { | 478 | 51.2k | _Py_Dealloc(op); | 479 | 51.2k | } | 480 | 61.3k | } |
Unexecuted instantiation: unicodectype.c:_Py_DECREF weakrefobject.c:_Py_DECREF Line | Count | Source | 466 | 1.93k | { | 467 | 1.93k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.93k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.93k | _Py_DEC_REFTOTAL; | 470 | 1.93k | 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.45k | } | 477 | 473 | else { | 478 | 473 | _Py_Dealloc(op); | 479 | 473 | } | 480 | 1.93k | } |
Unexecuted instantiation: _warnings.c:_Py_DECREF Line | Count | Source | 466 | 709k | { | 467 | 709k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 709k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 709k | _Py_DEC_REFTOTAL; | 470 | 709k | 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 | 646k | } | 477 | 63.0k | else { | 478 | 63.0k | _Py_Dealloc(op); | 479 | 63.0k | } | 480 | 709k | } |
Line | Count | Source | 466 | 276 | { | 467 | 276 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 276 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 276 | _Py_DEC_REFTOTAL; | 470 | 276 | 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 | 249 | } | 477 | 27 | else { | 478 | 27 | _Py_Dealloc(op); | 479 | 27 | } | 480 | 276 | } |
Line | Count | Source | 466 | 1.37k | { | 467 | 1.37k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.37k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.37k | _Py_DEC_REFTOTAL; | 470 | 1.37k | 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.10k | } | 477 | 271 | else { | 478 | 271 | _Py_Dealloc(op); | 479 | 271 | } | 480 | 1.37k | } |
Line | Count | Source | 466 | 21.4k | { | 467 | 21.4k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 21.4k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 21.4k | _Py_DEC_REFTOTAL; | 470 | 21.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 | 15.9k | } | 477 | 5.53k | else { | 478 | 5.53k | _Py_Dealloc(op); | 479 | 5.53k | } | 480 | 21.4k | } |
Unexecuted instantiation: future.c:_Py_DECREF Line | Count | Source | 466 | 1.59k | { | 467 | 1.59k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.59k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.59k | _Py_DEC_REFTOTAL; | 470 | 1.59k | 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.59k | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 1.59k | } |
Unexecuted instantiation: getversion.c:_Py_DECREF Line | Count | Source | 466 | 9.97k | { | 467 | 9.97k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 9.97k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 9.97k | _Py_DEC_REFTOTAL; | 470 | 9.97k | 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.06k | } | 477 | 908 | else { | 478 | 908 | _Py_Dealloc(op); | 479 | 908 | } | 480 | 9.97k | } |
Unexecuted instantiation: importdl.c:_Py_DECREF Unexecuted instantiation: initconfig.c:_Py_DECREF Line | Count | Source | 466 | 93.2k | { | 467 | 93.2k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 93.2k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 93.2k | _Py_DEC_REFTOTAL; | 470 | 93.2k | 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 | 93.0k | } | 477 | 259 | else { | 478 | 259 | _Py_Dealloc(op); | 479 | 259 | } | 480 | 93.2k | } |
Line | Count | Source | 466 | 3.47k | { | 467 | 3.47k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 3.47k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 3.47k | _Py_DEC_REFTOTAL; | 470 | 3.47k | 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.47k | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 3.47k | } |
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 | 455 | { | 467 | 455 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 455 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 455 | _Py_DEC_REFTOTAL; | 470 | 455 | 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 | 440 | } | 477 | 15 | else { | 478 | 15 | _Py_Dealloc(op); | 479 | 15 | } | 480 | 455 | } |
Unexecuted instantiation: pyctype.c:_Py_DECREF Unexecuted instantiation: pyhash.c:_Py_DECREF Line | Count | Source | 466 | 494 | { | 467 | 494 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 494 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 494 | _Py_DEC_REFTOTAL; | 470 | 494 | 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 | 455 | } | 477 | 39 | else { | 478 | 39 | _Py_Dealloc(op); | 479 | 39 | } | 480 | 494 | } |
Unexecuted instantiation: pymath.c:_Py_DECREF Unexecuted instantiation: pystate.c:_Py_DECREF Line | Count | Source | 466 | 30 | { | 467 | 30 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 30 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 30 | _Py_DEC_REFTOTAL; | 470 | 30 | 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 | 2 | else { | 478 | 2 | _Py_Dealloc(op); | 479 | 2 | } | 480 | 30 | } |
Unexecuted instantiation: pytime.c:_Py_DECREF Unexecuted instantiation: bootstrap_hash.c:_Py_DECREF 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.06k | } | 477 | 351 | else { | 478 | 351 | _Py_Dealloc(op); | 479 | 351 | } | 480 | 1.41k | } |
Line | Count | Source | 466 | 897 | { | 467 | 897 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 897 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 897 | _Py_DEC_REFTOTAL; | 470 | 897 | 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 | 871 | } | 477 | 26 | else { | 478 | 26 | _Py_Dealloc(op); | 479 | 26 | } | 480 | 897 | } |
Unexecuted instantiation: thread.c:_Py_DECREF Line | Count | Source | 466 | 4.46k | { | 467 | 4.46k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 4.46k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 4.46k | _Py_DEC_REFTOTAL; | 470 | 4.46k | 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.65k | } | 477 | 806 | else { | 478 | 806 | _Py_Dealloc(op); | 479 | 806 | } | 480 | 4.46k | } |
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 | 14.8k | { | 467 | 14.8k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 14.8k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 14.8k | _Py_DEC_REFTOTAL; | 470 | 14.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 | 9.01k | } | 477 | 5.84k | else { | 478 | 5.84k | _Py_Dealloc(op); | 479 | 5.84k | } | 480 | 14.8k | } |
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 | 15.0k | { | 467 | 15.0k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 15.0k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 15.0k | _Py_DEC_REFTOTAL; | 470 | 15.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 | 13.3k | } | 477 | 1.66k | else { | 478 | 1.66k | _Py_Dealloc(op); | 479 | 1.66k | } | 480 | 15.0k | } |
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.58k | { | 467 | 1.58k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.58k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.58k | _Py_DEC_REFTOTAL; | 470 | 1.58k | 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.06k | } | 477 | 520 | else { | 478 | 520 | _Py_Dealloc(op); | 479 | 520 | } | 480 | 1.58k | } |
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.14k | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 1.14k | } |
Line | Count | Source | 466 | 442 | { | 467 | 442 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 442 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 442 | _Py_DEC_REFTOTAL; | 470 | 442 | 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 | 442 | else { | 478 | 442 | _Py_Dealloc(op); | 479 | 442 | } | 480 | 442 | } |
Unexecuted instantiation: bytesio.c:_Py_DECREF Line | Count | Source | 466 | 1.70k | { | 467 | 1.70k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 1.70k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 1.70k | _Py_DEC_REFTOTAL; | 470 | 1.70k | 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.20k | } | 477 | 498 | else { | 478 | 498 | _Py_Dealloc(op); | 479 | 498 | } | 480 | 1.70k | } |
Line | Count | Source | 466 | 605 | { | 467 | 605 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 605 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 605 | _Py_DEC_REFTOTAL; | 470 | 605 | 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 | 497 | } | 477 | 108 | else { | 478 | 108 | _Py_Dealloc(op); | 479 | 108 | } | 480 | 605 | } |
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 | 15 | { | 467 | 15 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 15 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 15 | _Py_DEC_REFTOTAL; | 470 | 15 | 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 | 15 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 15 | } |
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 | 169 | { | 467 | 169 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 169 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 169 | _Py_DEC_REFTOTAL; | 470 | 169 | 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 | 156 | } | 477 | 13 | else { | 478 | 13 | _Py_Dealloc(op); | 479 | 13 | } | 480 | 169 | } |
Line | Count | Source | 466 | 15.0k | { | 467 | 15.0k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 15.0k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 15.0k | _Py_DEC_REFTOTAL; | 470 | 15.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 | 13.8k | } | 477 | 1.21k | else { | 478 | 1.21k | _Py_Dealloc(op); | 479 | 1.21k | } | 480 | 15.0k | } |
Line | Count | Source | 466 | 18.5k | { | 467 | 18.5k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 18.5k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 18.5k | _Py_DEC_REFTOTAL; | 470 | 18.5k | 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.4k | } | 477 | 8.08k | else { | 478 | 8.08k | _Py_Dealloc(op); | 479 | 8.08k | } | 480 | 18.5k | } |
Unexecuted instantiation: complexobject.c:_Py_DECREF Line | Count | Source | 466 | 4.05k | { | 467 | 4.05k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 4.05k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 4.05k | _Py_DEC_REFTOTAL; | 470 | 4.05k | 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.69k | } | 477 | 1.36k | else { | 478 | 1.36k | _Py_Dealloc(op); | 479 | 1.36k | } | 480 | 4.05k | } |
Line | Count | Source | 466 | 189 | { | 467 | 189 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 189 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 189 | _Py_DEC_REFTOTAL; | 470 | 189 | 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 | 25 | else { | 478 | 25 | _Py_Dealloc(op); | 479 | 25 | } | 480 | 189 | } |
Line | Count | Source | 466 | 2.13k | { | 467 | 2.13k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 2.13k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 2.13k | _Py_DEC_REFTOTAL; | 470 | 2.13k | 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.94k | } | 477 | 187 | else { | 478 | 187 | _Py_Dealloc(op); | 479 | 187 | } | 480 | 2.13k | } |
Line | Count | Source | 466 | 556 | { | 467 | 556 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 556 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 556 | _Py_DEC_REFTOTAL; | 470 | 556 | 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 | 444 | } | 477 | 112 | else { | 478 | 112 | _Py_Dealloc(op); | 479 | 112 | } | 480 | 556 | } |
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.2k | { | 467 | 10.2k | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 10.2k | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 10.2k | _Py_DEC_REFTOTAL; | 470 | 10.2k | 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.01k | } | 477 | 4.24k | else { | 478 | 4.24k | _Py_Dealloc(op); | 479 | 4.24k | } | 480 | 10.2k | } |
Line | Count | Source | 466 | 13 | { | 467 | 13 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 13 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 13 | _Py_DEC_REFTOTAL; | 470 | 13 | 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 | 13 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 13 | } |
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 | 313 | { | 467 | 313 | (void)filename; /* may be unused, shut up -Wunused-parameter */ | 468 | 313 | (void)lineno; /* may be unused, shut up -Wunused-parameter */ | 469 | 313 | _Py_DEC_REFTOTAL; | 470 | 313 | 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 | 313 | } | 477 | 0 | else { | 478 | 0 | _Py_Dealloc(op); | 479 | 0 | } | 480 | 313 | } |
Unexecuted instantiation: parser.c:_Py_DECREF Unexecuted instantiation: myreadline.c:_Py_DECREF |
481 | | |
482 | 2.87M | #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 | 304k | do { \ |
521 | 267k | PyObject *_py_tmp = _PyObject_CAST(op); \ |
522 | 267k | if (_py_tmp != NULL) { \ |
523 | 149k | (op) = NULL; \ |
524 | 149k | Py_DECREF(_py_tmp); \ |
525 | 149k | } \ |
526 | 267k | } while (0) |
527 | | |
528 | | /* Function to use in case the object pointer can be NULL: */ |
529 | | static inline void _Py_XINCREF(PyObject *op) |
530 | 151k | { |
531 | 151k | if (op != NULL) { |
532 | 121k | Py_INCREF(op); |
533 | 121k | } |
534 | 151k | } 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.14k | { | 531 | 4.14k | if (op != NULL) { | 532 | 597 | Py_INCREF(op); | 533 | 597 | } | 534 | 4.14k | } |
Unexecuted instantiation: floatobject.c:_Py_XINCREF frameobject.c:_Py_XINCREF Line | Count | Source | 530 | 37.6k | { | 531 | 37.6k | if (op != NULL) { | 532 | 34.9k | Py_INCREF(op); | 533 | 34.9k | } | 534 | 37.6k | } |
Unexecuted instantiation: iterobject.c:_Py_XINCREF Line | Count | Source | 530 | 606 | { | 531 | 606 | if (op != NULL) { | 532 | 606 | Py_INCREF(op); | 533 | 606 | } | 534 | 606 | } |
Unexecuted instantiation: longobject.c:_Py_XINCREF Line | Count | Source | 530 | 283 | { | 531 | 283 | if (op != NULL) { | 532 | 283 | Py_INCREF(op); | 533 | 283 | } | 534 | 283 | } |
Unexecuted instantiation: memoryobject.c:_Py_XINCREF methodobject.c:_Py_XINCREF Line | Count | Source | 530 | 31.4k | { | 531 | 31.4k | if (op != NULL) { | 532 | 20.6k | Py_INCREF(op); | 533 | 20.6k | } | 534 | 31.4k | } |
moduleobject.c:_Py_XINCREF Line | Count | Source | 530 | 1.60k | { | 531 | 1.60k | if (op != NULL) { | 532 | 1.60k | Py_INCREF(op); | 533 | 1.60k | } | 534 | 1.60k | } |
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 | 3.97k | { | 531 | 3.97k | if (op != NULL) { | 532 | 14 | Py_INCREF(op); | 533 | 14 | } | 534 | 3.97k | } |
Unexecuted instantiation: unicodeobject.c:_Py_XINCREF Unexecuted instantiation: unicodectype.c:_Py_XINCREF weakrefobject.c:_Py_XINCREF Line | Count | Source | 530 | 5.75k | { | 531 | 5.75k | if (op != NULL) { | 532 | 1.16k | Py_INCREF(op); | 533 | 1.16k | } | 534 | 5.75k | } |
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.5k | { | 531 | 17.5k | if (op != NULL) { | 532 | 17.3k | Py_INCREF(op); | 533 | 17.3k | } | 534 | 17.5k | } |
Unexecuted instantiation: future.c:_Py_XINCREF Unexecuted instantiation: getargs.c:_Py_XINCREF Unexecuted instantiation: getversion.c:_Py_XINCREF Line | Count | Source | 530 | 2.16k | { | 531 | 2.16k | if (op != NULL) { | 532 | 1.78k | Py_INCREF(op); | 533 | 1.78k | } | 534 | 2.16k | } |
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.61k | { | 531 | 7.61k | if (op != NULL) { | 532 | 4.13k | Py_INCREF(op); | 533 | 4.13k | } | 534 | 7.61k | } |
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 | 13 | { | 531 | 13 | if (op != NULL) { | 532 | 13 | Py_INCREF(op); | 533 | 13 | } | 534 | 13 | } |
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 | 515 | { | 531 | 515 | if (op != NULL) { | 532 | 515 | Py_INCREF(op); | 533 | 515 | } | 534 | 515 | } |
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 | 220 | { | 531 | 220 | if (op != NULL) { | 532 | 220 | Py_INCREF(op); | 533 | 220 | } | 534 | 220 | } |
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 | 524 | { | 531 | 524 | if (op != NULL) { | 532 | 290 | Py_INCREF(op); | 533 | 290 | } | 534 | 524 | } |
classobject.c:_Py_XINCREF Line | Count | Source | 530 | 7.53k | { | 531 | 7.53k | if (op != NULL) { | 532 | 7.53k | Py_INCREF(op); | 533 | 7.53k | } | 534 | 7.53k | } |
Unexecuted instantiation: codeobject.c:_Py_XINCREF Unexecuted instantiation: complexobject.c:_Py_XINCREF descrobject.c:_Py_XINCREF Line | Count | Source | 530 | 27.4k | { | 531 | 27.4k | if (op != NULL) { | 532 | 27.2k | Py_INCREF(op); | 533 | 27.2k | } | 534 | 27.4k | } |
Unexecuted instantiation: enumobject.c:_Py_XINCREF Line | Count | Source | 530 | 1.02k | { | 531 | 1.02k | if (op != NULL) { | 532 | 1.02k | Py_INCREF(op); | 533 | 1.02k | } | 534 | 1.02k | } |
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 | 149 | { | 531 | 149 | if (op != NULL) { | 532 | 149 | Py_INCREF(op); | 533 | 149 | } | 534 | 149 | } |
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 | 957 | { | 531 | 957 | if (op != NULL) { | 532 | 957 | Py_INCREF(op); | 533 | 957 | } | 534 | 957 | } |
Unexecuted instantiation: parser.c:_Py_XINCREF Unexecuted instantiation: myreadline.c:_Py_XINCREF |
535 | | |
536 | 151k | #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 | 962k | Py_DECREF(op); |
542 | 962k | } |
543 | 1.47M | } Unexecuted instantiation: abstract.c:_Py_XDECREF Unexecuted instantiation: boolobject.c:_Py_XDECREF bytearrayobject.c:_Py_XDECREF Line | Count | Source | 539 | 13 | { | 540 | 13 | if (op != NULL) { | 541 | 13 | Py_DECREF(op); | 542 | 13 | } | 543 | 13 | } |
bytesobject.c:_Py_XDECREF Line | Count | Source | 539 | 14 | { | 540 | 14 | if (op != NULL) { | 541 | 13 | Py_DECREF(op); | 542 | 13 | } | 543 | 14 | } |
Unexecuted instantiation: call.c:_Py_XDECREF Unexecuted instantiation: capsule.c:_Py_XDECREF Line | Count | Source | 539 | 9.43k | { | 540 | 9.43k | if (op != NULL) { | 541 | 3.97k | Py_DECREF(op); | 542 | 3.97k | } | 543 | 9.43k | } |
Unexecuted instantiation: floatobject.c:_Py_XDECREF frameobject.c:_Py_XDECREF Line | Count | Source | 539 | 37.6k | { | 540 | 37.6k | if (op != NULL) { | 541 | 34.7k | Py_DECREF(op); | 542 | 34.7k | } | 543 | 37.6k | } |
Line | Count | Source | 539 | 954 | { | 540 | 954 | if (op != NULL) { | 541 | 279 | Py_DECREF(op); | 542 | 279 | } | 543 | 954 | } |
Line | Count | Source | 539 | 67 | { | 540 | 67 | if (op != NULL) { | 541 | 0 | Py_DECREF(op); | 542 | 0 | } | 543 | 67 | } |
Line | Count | Source | 539 | 83.9k | { | 540 | 83.9k | if (op != NULL) { | 541 | 83.1k | Py_DECREF(op); | 542 | 83.1k | } | 543 | 83.9k | } |
Unexecuted instantiation: longobject.c:_Py_XDECREF Line | Count | Source | 539 | 449k | { | 540 | 449k | if (op != NULL) { | 541 | 435k | Py_DECREF(op); | 542 | 435k | } | 543 | 449k | } |
Unexecuted instantiation: memoryobject.c:_Py_XDECREF methodobject.c:_Py_XDECREF Line | Count | Source | 539 | 16.5k | { | 540 | 16.5k | if (op != NULL) { | 541 | 8.28k | Py_DECREF(op); | 542 | 8.28k | } | 543 | 16.5k | } |
moduleobject.c:_Py_XDECREF Line | Count | Source | 539 | 2.09k | { | 540 | 2.09k | if (op != NULL) { | 541 | 1.62k | Py_DECREF(op); | 542 | 1.62k | } | 543 | 2.09k | } |
Line | Count | Source | 539 | 112k | { | 540 | 112k | if (op != NULL) { | 541 | 20.3k | Py_DECREF(op); | 542 | 20.3k | } | 543 | 112k | } |
Unexecuted instantiation: obmalloc.c:_Py_XDECREF Unexecuted instantiation: picklebufobject.c:_Py_XDECREF rangeobject.c:_Py_XDECREF Line | Count | Source | 539 | 52 | { | 540 | 52 | if (op != NULL) { | 541 | 52 | Py_DECREF(op); | 542 | 52 | } | 543 | 52 | } |
Line | Count | Source | 539 | 457 | { | 540 | 457 | if (op != NULL) { | 541 | 13 | Py_DECREF(op); | 542 | 13 | } | 543 | 457 | } |
Unexecuted instantiation: sliceobject.c:_Py_XDECREF Line | Count | Source | 539 | 15.2k | { | 540 | 15.2k | if (op != NULL) { | 541 | 15.2k | Py_DECREF(op); | 542 | 15.2k | } | 543 | 15.2k | } |
tupleobject.c:_Py_XDECREF Line | Count | Source | 539 | 149k | { | 540 | 149k | if (op != NULL) { | 541 | 145k | Py_DECREF(op); | 542 | 145k | } | 543 | 149k | } |
Line | Count | Source | 539 | 82.3k | { | 540 | 82.3k | if (op != NULL) { | 541 | 10.1k | Py_DECREF(op); | 542 | 10.1k | } | 543 | 82.3k | } |
unicodeobject.c:_Py_XDECREF Line | Count | Source | 539 | 123k | { | 540 | 123k | if (op != NULL) { | 541 | 2.39k | Py_DECREF(op); | 542 | 2.39k | } | 543 | 123k | } |
Unexecuted instantiation: unicodectype.c:_Py_XDECREF Unexecuted instantiation: weakrefobject.c:_Py_XDECREF Unexecuted instantiation: _warnings.c:_Py_XDECREF Line | Count | Source | 539 | 117k | { | 540 | 117k | if (op != NULL) { | 541 | 42.9k | Py_DECREF(op); | 542 | 42.9k | } | 543 | 117k | } |
Unexecuted instantiation: codecs.c:_Py_XDECREF Line | Count | Source | 539 | 204 | { | 540 | 204 | if (op != NULL) { | 541 | 183 | Py_DECREF(op); | 542 | 183 | } | 543 | 204 | } |
Line | Count | Source | 539 | 110k | { | 540 | 110k | if (op != NULL) { | 541 | 18.3k | Py_DECREF(op); | 542 | 18.3k | } | 543 | 110k | } |
Unexecuted instantiation: future.c:_Py_XDECREF Unexecuted instantiation: getargs.c:_Py_XDECREF Unexecuted instantiation: getversion.c:_Py_XDECREF Line | Count | Source | 539 | 7.75k | { | 540 | 7.75k | if (op != NULL) { | 541 | 5.84k | Py_DECREF(op); | 542 | 5.84k | } | 543 | 7.75k | } |
Unexecuted instantiation: importdl.c:_Py_XDECREF Unexecuted instantiation: initconfig.c:_Py_XDECREF Line | Count | Source | 539 | 92.7k | { | 540 | 92.7k | if (op != NULL) { | 541 | 92.7k | Py_DECREF(op); | 542 | 92.7k | } | 543 | 92.7k | } |
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 | 39 | { | 540 | 39 | if (op != NULL) { | 541 | 39 | Py_DECREF(op); | 542 | 39 | } | 543 | 39 | } |
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 | 297 | { | 540 | 297 | if (op != NULL) { | 541 | 276 | Py_DECREF(op); | 542 | 276 | } | 543 | 297 | } |
Unexecuted instantiation: sysmodule.c:_Py_XDECREF Unexecuted instantiation: thread.c:_Py_XDECREF Line | Count | Source | 539 | 11.4k | { | 540 | 11.4k | if (op != NULL) { | 541 | 4.46k | Py_DECREF(op); | 542 | 4.46k | } | 543 | 11.4k | } |
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.0k | { | 540 | 12.0k | if (op != NULL) { | 541 | 4.80k | Py_DECREF(op); | 542 | 4.80k | } | 543 | 12.0k | } |
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.81k | { | 540 | 1.81k | if (op != NULL) { | 541 | 1.61k | Py_DECREF(op); | 542 | 1.61k | } | 543 | 1.81k | } |
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 | 664 | { | 540 | 664 | if (op != NULL) { | 541 | 0 | Py_DECREF(op); | 542 | 0 | } | 543 | 664 | } |
Unexecuted instantiation: fileio.c:_Py_XDECREF Unexecuted instantiation: bytesio.c:_Py_XDECREF Line | Count | Source | 539 | 923 | { | 540 | 923 | if (op != NULL) { | 541 | 222 | Py_DECREF(op); | 542 | 222 | } | 543 | 923 | } |
Line | Count | Source | 539 | 126 | { | 540 | 126 | if (op != NULL) { | 541 | 69 | Py_DECREF(op); | 542 | 69 | } | 543 | 126 | } |
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 | 45 | { | 540 | 45 | if (op != NULL) { | 541 | 15 | Py_DECREF(op); | 542 | 15 | } | 543 | 45 | } |
Unexecuted instantiation: accu.c:_Py_XDECREF Unexecuted instantiation: bytes_methods.c:_Py_XDECREF Line | Count | Source | 539 | 243 | { | 540 | 243 | if (op != NULL) { | 541 | 162 | Py_DECREF(op); | 542 | 162 | } | 543 | 243 | } |
classobject.c:_Py_XDECREF Line | Count | Source | 539 | 7.53k | { | 540 | 7.53k | if (op != NULL) { | 541 | 7.53k | Py_DECREF(op); | 542 | 7.53k | } | 543 | 7.53k | } |
Line | Count | Source | 539 | 18.3k | { | 540 | 18.3k | if (op != NULL) { | 541 | 18.3k | Py_DECREF(op); | 542 | 18.3k | } | 543 | 18.3k | } |
Unexecuted instantiation: complexobject.c:_Py_XDECREF descrobject.c:_Py_XDECREF Line | Count | Source | 539 | 1.93k | { | 540 | 1.93k | if (op != NULL) { | 541 | 1.01k | Py_DECREF(op); | 542 | 1.01k | } | 543 | 1.93k | } |
Line | Count | Source | 539 | 15 | { | 540 | 15 | if (op != NULL) { | 541 | 10 | Py_DECREF(op); | 542 | 10 | } | 543 | 15 | } |
Line | Count | Source | 539 | 1.33k | { | 540 | 1.33k | if (op != NULL) { | 541 | 14 | Py_DECREF(op); | 542 | 14 | } | 543 | 1.33k | } |
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 | 2.91k | { | 540 | 2.91k | if (op != NULL) { | 541 | 1.78k | Py_DECREF(op); | 542 | 1.78k | } | 543 | 2.91k | } |
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 | 453 | { | 540 | 453 | if (op != NULL) { | 541 | 313 | Py_DECREF(op); | 542 | 313 | } | 543 | 453 | } |
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 | 249k | #define Py_None (&_Py_NoneStruct) |
562 | | |
563 | | /* Macro for returning Py_None from a function */ |
564 | 12.4k | #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 | 131k | #define Py_NotImplemented (&_Py_NotImplementedStruct) |
572 | | |
573 | | /* Macro for returning Py_NotImplemented from a function */ |
574 | | #define Py_RETURN_NOTIMPLEMENTED \ |
575 | 748 | return Py_INCREF(Py_NotImplemented), Py_NotImplemented |
576 | | |
577 | | /* Rich comparison opcodes */ |
578 | 1.87k | #define Py_LT 0 |
579 | 495 | #define Py_LE 1 |
580 | 289k | #define Py_EQ 2 |
581 | 104k | #define Py_NE 3 |
582 | 1.73k | #define Py_GT 4 |
583 | 2.56k | #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 | 7.89k | do { \ |
592 | 7.89k | switch (op) { \ |
593 | 3.19k | case Py_EQ: if ((val1) == (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
594 | 3.19k | case Py_NE: if ((val1) != (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
595 | 1.31k | case Py_LT: if ((val1) < (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
596 | 786 | case Py_GT: if ((val1) > (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
597 | 786 | case Py_LE: if ((val1) <= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
598 | 2.03k | case Py_GE: if ((val1) >= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \ |
599 | 2.03k | default: \ |
600 | 0 | Py_UNREACHABLE(); \ |
601 | 7.89k | } \ |
602 | 7.89k | } 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 | 108k | #define PyTrash_UNWIND_LEVEL 50 |
710 | | |
711 | | #define Py_TRASHCAN_BEGIN_CONDITION(op, cond) \ |
712 | 108k | do { \ |
713 | 108k | PyThreadState *_tstate = NULL; \ |
714 | 108k | /* If "cond" is false, then _tstate remains NULL and the deallocator \ |
715 | 108k | * is run normally without involving the trashcan */ \ |
716 | 108k | if (cond) { \ |
717 | 108k | _tstate = PyThreadState_GET(); \ |
718 | 108k | 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 | 108k | ++_tstate->trash_delete_nesting; \ |
725 | 108k | } |
726 | | /* The body of the deallocator is here. */ |
727 | | #define Py_TRASHCAN_END \ |
728 | 108k | if (_tstate) { \ |
729 | 108k | --_tstate->trash_delete_nesting; \ |
730 | 108k | if (_tstate->trash_delete_later && _tstate->trash_delete_nesting <= 0) \ |
731 | 108k | _PyTrash_thread_destroy_chain(); \ |
732 | 108k | } \ |
733 | 108k | } while (0); |
734 | | |
735 | 70.7k | #define Py_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_BEGIN_CONDITION(op, \ |
736 | 70.7k | Py_TYPE(op)->tp_dealloc == (destructor)(dealloc)) |
737 | | |
738 | | /* For backwards compatibility, these macros enable the trashcan |
739 | | * unconditionally */ |
740 | 37.6k | #define Py_TRASHCAN_SAFE_BEGIN(op) Py_TRASHCAN_BEGIN_CONDITION(op, 1) |
741 | 37.6k | #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 */ |