/third_party/python/Objects/ |
D | object.c | 43 CHECK(Py_REFCNT(op) >= 1); in _PyObject_CheckConsistency() 69 total -= Py_REFCNT(o); in _Py_GetRefTotal() 224 if (Py_REFCNT(self) != 0) { in PyObject_CallFinalizerFromDealloc() 236 Py_REFCNT(self) > 0, in PyObject_CallFinalizerFromDealloc() 241 Py_SET_REFCNT(self, Py_REFCNT(self) - 1); in PyObject_CallFinalizerFromDealloc() 242 if (Py_REFCNT(self) == 0) { in PyObject_CallFinalizerFromDealloc() 248 Py_ssize_t refcnt = Py_REFCNT(self); in PyObject_CallFinalizerFromDealloc() 282 if (Py_REFCNT(op) <= 0) { in PyObject_Print() 287 (long)Py_REFCNT(op), (void *)op); in PyObject_Print() 382 fprintf(stderr, "object refcount : %ld\n", (long)Py_REFCNT(op)); in _PyObject_Dump() [all …]
|
D | enumobject.c | 127 if (Py_REFCNT(result) == 1) { in enum_next_long() 177 if (Py_REFCNT(result) == 1) { in enum_next()
|
D | weakrefobject.c | 973 || Py_REFCNT(object) != 0) in PyObject_ClearWeakRefs() 997 if (Py_REFCNT((PyObject *)current) > 0) { in PyObject_ClearWeakRefs() 1016 if (Py_REFCNT((PyObject *)current) > 0) { in PyObject_ClearWeakRefs()
|
D | fileobject.c | 88 if (Py_REFCNT(result) == 1) in PyFile_GetLine()
|
D | tupleobject.c | 197 if (!PyTuple_Check(op) || Py_REFCNT(op) != 1) { in PyTuple_SetItem() 961 (Py_SIZE(v) != 0 && Py_REFCNT(v) != 1)) { in _PyTuple_Resize()
|
D | longobject.c | 71 if (Py_REFCNT(x) == 1) { in _PyLong_Negate() 3107 assert(Py_REFCNT(z) == 1); in long_add() 3140 assert(Py_SIZE(z) == 0 || Py_REFCNT(z) == 1); in long_sub() 4495 assert(Py_REFCNT(z) == 1); in long_lshift1() 4830 else if (Py_REFCNT(a) == 1) { in _PyLong_GCD() 4844 else if (Py_REFCNT(b) == 1 && size_a <= alloc_b) { in _PyLong_GCD() 4895 assert(Py_REFCNT(a) > 0); in _PyLong_GCD() 4896 assert(Py_REFCNT(b) > 0); in _PyLong_GCD()
|
D | structseq.c | 480 if (Py_REFCNT(type) != 0) { in _PyStructSequence_InitType()
|
D | bytesobject.c | 2949 if (Py_REFCNT(*pv) == 1 && PyBytes_CheckExact(*pv)) { in PyBytes_Concat() 3030 if (Py_REFCNT(v) != 1) { in _PyBytes_Resize() 3307 assert(Py_REFCNT(writer->buffer) == 1); in _PyBytesWriter_CheckConsistency()
|
D | unicodeobject.c | 650 assert(Py_REFCNT(unicode) == 1); in unicode_result_wchar() 1115 assert(Py_REFCNT(unicode) == 1); in resize_inplace() 1961 assert(Py_REFCNT(unicode) == 0); in unicode_dealloc() 1967 assert(Py_REFCNT(unicode) == 1); in unicode_dealloc() 2018 if (Py_REFCNT(unicode) != 1) in unicode_modifiable() 14800 if (Py_REFCNT(result) != 1) { in _PyUnicode_FormatLong() 15884 Py_SET_REFCNT(s, Py_REFCNT(s) - 2); in PyUnicode_InternInPlace() 15953 Py_SET_REFCNT(s, Py_REFCNT(s) + 1); in _PyUnicode_ClearInterned() 15961 Py_SET_REFCNT(s, Py_REFCNT(s) + 2); in _PyUnicode_ClearInterned()
|
D | odictobject.c | 1812 if (Py_REFCNT(result) == 1) { in odictiter_iternext()
|
/third_party/python/Include/ |
D | weakrefobject.h | 78 (Py_REFCNT(((PyWeakReference *)(ref))->wr_object) > 0 \
|
D | object.h | 133 #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob)) macro
|
/third_party/python/Doc/c-api/ |
D | structures.rst | 31 members must be done by using the macros :c:macro:`Py_REFCNT` and 41 :c:macro:`Py_REFCNT`, :c:macro:`Py_TYPE`, and :c:macro:`Py_SIZE`. 120 .. c:function:: Py_ssize_t Py_REFCNT(const PyObject *o) 125 :c:func:`Py_REFCNT()` is changed to the inline static function.
|
/third_party/python/Modules/ |
D | _testcapimodule.c | 1029 if (Py_REFCNT(arg) != 1) { in test_buildvalue_N_error() 1044 if (Py_REFCNT(arg) != 1) { in test_buildvalue_N_error() 1072 if (Py_REFCNT(arg) != 2) { in test_buildvalue_N() 3423 res = PyLong_FromSsize_t(Py_REFCNT(str2)); in argparsing() 3715 assert(Py_REFCNT(self) == 0); in slot_tp_del() 3738 assert(Py_REFCNT(self) > 0); in slot_tp_del() 3739 Py_SET_REFCNT(self, Py_REFCNT(self) - 1); in slot_tp_del() 3740 if (Py_REFCNT(self) == 0) { in slot_tp_del() 3749 Py_ssize_t refcnt = Py_REFCNT(self); in slot_tp_del() 5343 assert(Py_REFCNT(obj) == 1); in negative_refcount() [all …]
|
D | itertoolsmodule.c | 664 Py_REFCNT(obj) == 1) { in teedataobject_safe_decref() 2375 if (Py_REFCNT(result) > 1) { in product_next() 2389 assert (npools==0 || Py_REFCNT(result) == 1); in product_next() 2703 if (Py_REFCNT(result) > 1) { in combinations_next() 2720 assert(r == 0 || Py_REFCNT(result) == 1); in combinations_next() 3042 if (Py_REFCNT(result) > 1) { in cwr_next() 3057 assert(r == 0 || Py_REFCNT(result) == 1); in cwr_next() 3391 if (Py_REFCNT(result) > 1) { in permutations_next() 3405 assert(r == 0 || Py_REFCNT(result) == 1); in permutations_next() 4647 if (Py_REFCNT(result) == 1) { in zip_longest_next()
|
D | _functoolsmodule.c | 124 else if (Py_REFCNT(kw) == 1) { in partial_new() 679 if (Py_REFCNT(args) > 1) { in functools_reduce() 696 assert(Py_REFCNT(args) == 1); in functools_reduce()
|
D | gcmodule.c | 427 gc_reset_refs(gc, Py_REFCNT(FROM_GC(gc))); in update_refs() 1004 _PyObject_ASSERT_WITH_MSG(op, Py_REFCNT(op) > 0, in delete_garbage()
|
D | _zoneinfo.c | 2624 if (TIMEDELTA_CACHE != NULL && Py_REFCNT(TIMEDELTA_CACHE) > 1) { in module_free() 2630 if (ZONEINFO_WEAK_CACHE != NULL && Py_REFCNT(ZONEINFO_WEAK_CACHE) > 1) { in module_free()
|
D | _elementtree.c | 874 if (Py_REFCNT(object) == 1) { in deepcopy() 2759 if (PyBytes_CheckExact(self->data) && Py_REFCNT(self->data) == 1 && in treebuilder_handle_data()
|
/third_party/python/Modules/_io/ |
D | iobase.c | 317 is_zombie = (Py_REFCNT(self) == 0); in _PyIOBase_finalize()
|
D | bytesio.c | 65 #define SHARED_BUF(self) (Py_REFCNT((self)->buf) > 1)
|
/third_party/python/Programs/ |
D | _testembed.c | 1735 assert(Py_REFCNT(str1) == 1); in test_unicode_id_init()
|
/third_party/python/Python/ |
D | marshal.c | 302 if (Py_REFCNT(v) == 1) in w_ref()
|
D | ceval.c | 5010 if (Py_REFCNT(f) > 1) { in _PyEval_MakeFrameVector() 5072 if (Py_REFCNT(f) > 1) { in _PyEval_Vector() 6318 if (Py_REFCNT(v) == 2) { in unicode_concatenate()
|
D | bltinmodule.c | 2741 if (Py_REFCNT(result) == 1) { in zip_next()
|