Home
last modified time | relevance | path

Searched refs:Py_REFCNT (Results 1 – 25 of 63) sorted by relevance

123

/external/python/cpython3/Objects/
Dobject.c36 CHECK(Py_REFCNT(op) >= 1); in _PyObject_CheckConsistency()
62 total -= Py_REFCNT(o); in _Py_GetRefTotal()
204 if (Py_REFCNT(self) != 0) { in PyObject_CallFinalizerFromDealloc()
216 Py_REFCNT(self) > 0, in PyObject_CallFinalizerFromDealloc()
221 Py_SET_REFCNT(self, Py_REFCNT(self) - 1); in PyObject_CallFinalizerFromDealloc()
222 if (Py_REFCNT(self) == 0) { in PyObject_CallFinalizerFromDealloc()
228 Py_ssize_t refcnt = Py_REFCNT(self); in PyObject_CallFinalizerFromDealloc()
262 if (Py_REFCNT(op) <= 0) { in PyObject_Print()
267 (long)Py_REFCNT(op), (void *)op); in PyObject_Print()
362 fprintf(stderr, "object refcount : %ld\n", (long)Py_REFCNT(op)); in _PyObject_Dump()
[all …]
Denumobject.c125 if (Py_REFCNT(result) == 1) { in enum_next_long()
170 if (Py_REFCNT(result) == 1) { in enum_next()
Dweakrefobject.c981 || Py_REFCNT(object) != 0) in PyObject_ClearWeakRefs()
1005 if (Py_REFCNT((PyObject *)current) > 0) { in PyObject_ClearWeakRefs()
1024 if (Py_REFCNT((PyObject *)current) > 0) { in PyObject_ClearWeakRefs()
Dfileobject.c88 if (Py_REFCNT(result) == 1) in PyFile_GetLine()
Dtupleobject.c157 if (!PyTuple_Check(op) || Py_REFCNT(op) != 1) { in PyTuple_SetItem()
911 (Py_SIZE(v) != 0 && Py_REFCNT(v) != 1)) { in _PyTuple_Resize()
Dlongobject.c76 if (Py_REFCNT(x) == 1) { in _PyLong_Negate()
3208 assert(Py_REFCNT(z) == 1); in long_add()
3241 assert(Py_SIZE(z) == 0 || Py_REFCNT(z) == 1); in long_sub()
4595 assert(Py_REFCNT(z) == 1); in long_lshift1()
4930 else if (Py_REFCNT(a) == 1) { in _PyLong_GCD()
4944 else if (Py_REFCNT(b) == 1 && size_a <= alloc_b) { in _PyLong_GCD()
4995 assert(Py_REFCNT(a) > 0); in _PyLong_GCD()
4996 assert(Py_REFCNT(b) > 0); in _PyLong_GCD()
Dstructseq.c400 if (Py_REFCNT(type) != 0) { in PyStructSequence_InitType2()
/external/python/cpython2/Modules/_io/
Diobase.c214 is_zombie = (Py_REFCNT(self) == 0); in _PyIOBase_finalize()
216 ++Py_REFCNT(self); in _PyIOBase_finalize()
243 if (--Py_REFCNT(self) != 0) { in _PyIOBase_finalize()
246 Py_ssize_t refcnt = Py_REFCNT(self); in _PyIOBase_finalize()
248 Py_REFCNT(self) = refcnt; in _PyIOBase_finalize()
Dtextio.c309 if (Py_REFCNT(output) == 1) { in _PyIncrementalNewlineDecoder_decode()
408 if (Py_REFCNT(output) != 1) { in _PyIncrementalNewlineDecoder_decode()
416 assert(Py_REFCNT(translated) == 1); in _PyIncrementalNewlineDecoder_decode()
1812 if (start == 0 && Py_REFCNT(line) == 1) { in _textiowrapper_readline()
/external/python/cpython2/Include/
Dweakrefobject.h74 (Py_REFCNT(((PyWeakReference *)(ref))->wr_object) > 0 \
Dobject.h114 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) macro
758 Py_REFCNT(op) = 1)
/external/python/cpython3/Include/
Dweakrefobject.h78 (Py_REFCNT(((PyWeakReference *)(ref))->wr_object) > 0 \
Dobject.h123 #define Py_REFCNT(ob) (_PyObject_CAST(ob)->ob_refcnt) macro
/external/python/pybind11/tests/
Dtest_kwargs_and_defaults.cpp74 t[i] = (int) Py_REFCNT(PyTuple_GET_ITEM(a.ptr(), static_cast<py::ssize_t>(i))); in TEST_SUBMODULE()
83 t[i + 1] = (int) Py_REFCNT(PyTuple_GET_ITEM(a.ptr(), static_cast<py::ssize_t>(i))); in TEST_SUBMODULE()
/external/python/cpython2/Modules/
Ditertoolsmodule.c392 Py_REFCNT(obj) == 1) { in teedataobject_safe_decref()
1940 if (Py_REFCNT(result) > 1) { in product_next()
1954 assert (npools==0 || Py_REFCNT(result) == 1); in product_next()
2168 if (Py_REFCNT(result) > 1) { in combinations_next()
2185 assert(r == 0 || Py_REFCNT(result) == 1); in combinations_next()
2417 if (Py_REFCNT(result) > 1) { in cwr_next()
2432 assert(r == 0 || Py_REFCNT(result) == 1); in cwr_next()
2680 if (Py_REFCNT(result) > 1) { in permutations_next()
2694 assert(r == 0 || Py_REFCNT(result) == 1); in permutations_next()
3581 if (Py_REFCNT(result) == 1) { in izip_next()
[all …]
/external/python/cpython2/Objects/
Dweakrefobject.c917 || Py_REFCNT(object) != 0) { in PyObject_ClearWeakRefs()
940 if (Py_REFCNT(current) > 0) in PyObject_ClearWeakRefs()
958 if (Py_REFCNT(current) > 0) in PyObject_ClearWeakRefs()
Dintobject.c1489 if (PyInt_CheckExact(p) && Py_REFCNT(p) != 0) in PyInt_ClearFreeList()
1500 Py_REFCNT(p) == 0) { in PyInt_ClearFreeList()
1563 if (PyInt_CheckExact(p) && Py_REFCNT(p) != 0) in PyInt_Fini()
1570 p, (long)Py_REFCNT(p), in PyInt_Fini()
Dclassobject.c642 assert(Py_REFCNT(inst) == 0); in instance_dealloc()
643 Py_REFCNT(inst) = 1; in instance_dealloc()
667 assert(Py_REFCNT(inst) > 0); in instance_dealloc()
668 if (--Py_REFCNT(inst) == 0) { in instance_dealloc()
684 Py_ssize_t refcnt = Py_REFCNT(inst); in instance_dealloc()
689 Py_REFCNT(inst) = refcnt; in instance_dealloc()
Dfloatobject.c2230 if (PyFloat_CheckExact(p) && Py_REFCNT(p) != 0) in PyFloat_ClearFreeList()
2241 Py_REFCNT(p) == 0) { in PyFloat_ClearFreeList()
2285 Py_REFCNT(p) != 0) { in PyFloat_Fini()
2298 p, (long)Py_REFCNT(p), buf); in PyFloat_Fini()
/external/python/cffi/c/
Dmisc_thread_common.h211 assert(Py_REFCNT(canary) == 1); in thread_canary_register()
/external/python/cpython3/Modules/
Ditertoolsmodule.c529 Py_REFCNT(obj) == 1) { in teedataobject_safe_decref()
2240 if (Py_REFCNT(result) > 1) { in product_next()
2249 assert (npools==0 || Py_REFCNT(result) == 1); in product_next()
2563 if (Py_REFCNT(result) > 1) { in combinations_next()
2575 assert(r == 0 || Py_REFCNT(result) == 1); in combinations_next()
2897 if (Py_REFCNT(result) > 1) { in cwr_next()
2907 assert(r == 0 || Py_REFCNT(result) == 1); in cwr_next()
3241 if (Py_REFCNT(result) > 1) { in permutations_next()
3250 assert(r == 0 || Py_REFCNT(result) == 1); in permutations_next()
4491 if (Py_REFCNT(result) == 1) { in zip_longest_next()
D_functoolsmodule.c89 else if (Py_REFCNT(kw) == 1) { in partial_new()
653 if (Py_REFCNT(args) > 1) { in functools_reduce()
670 assert(Py_REFCNT(args) == 1); in functools_reduce()
D_testcapimodule.c955 if (Py_REFCNT(arg) != 1) { in test_buildvalue_N_error()
970 if (Py_REFCNT(arg) != 1) { in test_buildvalue_N_error()
998 if (Py_REFCNT(arg) != 2) { in test_buildvalue_N()
3275 res = PyLong_FromSsize_t(Py_REFCNT(str2)); in argparsing()
3567 assert(Py_REFCNT(self) == 0); in slot_tp_del()
3590 assert(Py_REFCNT(self) > 0); in slot_tp_del()
3591 Py_SET_REFCNT(self, Py_REFCNT(self) - 1); in slot_tp_del()
3592 if (Py_REFCNT(self) == 0) { in slot_tp_del()
3601 Py_ssize_t refcnt = Py_REFCNT(self); in slot_tp_del()
5158 assert(Py_REFCNT(obj) == 1); in negative_refcount()
[all …]
/external/python/cpython3/Doc/c-api/
Dstructures.rst31 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`.
88 .. c:macro:: Py_REFCNT(o)
/external/python/cpython3/Python/
Dpeephole.c252 assert(tabsiz == 0 || Py_REFCNT(lnotab_obj) == 1); in PyCode_Optimize()

123