Home
last modified time | relevance | path

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

123

/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/protobuf/python/google/protobuf/pyext/
Dscoped_pyobject_ptr.h78 Py_ssize_t refcnt() const { return Py_REFCNT(ptr_); } in refcnt()
/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.h117 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) macro
781 Py_REFCNT(op) = 1)
/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 …]
D_testcapimodule.c970 if (Py_REFCNT(arg) != 1) { in test_buildvalue_N_error()
985 if (Py_REFCNT(arg) != 1) { in test_buildvalue_N_error()
1013 if (Py_REFCNT(arg) != 2) { in test_buildvalue_N()
/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()
Dstringobject.c585 Py_REFCNT(op) = 3; in string_dealloc()
3896 if (!PyString_Check(v) || Py_REFCNT(v) != 1 || newsize < 0 || in _PyString_Resize()
4088 Py_REFCNT(result) == 1 && in _PyString_FormatLong()
4776 Py_REFCNT(s) -= 2; in PyString_InternInPlace()
4840 Py_REFCNT(s) += 1; in _Py_ReleaseInternedStrings()
4844 Py_REFCNT(s) += 2; in _Py_ReleaseInternedStrings()
Dbytesobject.c2893 if (Py_REFCNT(*pv) == 1 && PyBytes_CheckExact(*pv)) { in PyBytes_Concat()
2967 if (Py_REFCNT(v) != 1) { in _PyBytes_Resize()
3224 assert(Py_REFCNT(writer->buffer) == 1); in _PyBytesWriter_CheckConsistency()
/external/python/cpython3/Doc/c-api/
Dstructures.rst27 members must be done by using the macros :c:macro:`Py_REFCNT` and
37 :c:macro:`Py_REFCNT`, :c:macro:`Py_TYPE`, and :c:macro:`Py_SIZE`.
69 .. c:macro:: Py_REFCNT(o)
/external/python/cpython3/Modules/
Ditertoolsmodule.c474 Py_REFCNT(obj) == 1) { in teedataobject_safe_decref()
2190 if (Py_REFCNT(result) > 1) { in product_next()
2204 assert (npools==0 || Py_REFCNT(result) == 1); in product_next()
2514 if (Py_REFCNT(result) > 1) { in combinations_next()
2531 assert(r == 0 || Py_REFCNT(result) == 1); in combinations_next()
2856 if (Py_REFCNT(result) > 1) { in cwr_next()
2871 assert(r == 0 || Py_REFCNT(result) == 1); in cwr_next()
3206 if (Py_REFCNT(result) > 1) { in permutations_next()
3220 assert(r == 0 || Py_REFCNT(result) == 1); in permutations_next()
4448 if (Py_REFCNT(result) == 1) { in zip_longest_next()
Dgcmodule.c243 _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc))); in update_refs()
719 _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc))); in check_garbage()
/external/python/cpython3/Objects/
Dlongobject.c93 if (Py_REFCNT(x) == 1) { in _PyLong_Negate()
3100 assert(Py_REFCNT(z) == 1); in long_add()
3132 assert(Py_SIZE(z) == 0 || Py_REFCNT(z) == 1); in long_sub()
4368 assert(Py_REFCNT(z) == 1); in long_lshift()
4668 else if (Py_REFCNT(a) == 1) { in _PyLong_GCD()
4681 else if (Py_REFCNT(b) == 1 && size_a <= alloc_b) { in _PyLong_GCD()
4732 assert(Py_REFCNT(a) > 0); in _PyLong_GCD()
4733 assert(Py_REFCNT(b) > 0); in _PyLong_GCD()
5478 refcnt = Py_REFCNT(op) < 0 ? 0 : Py_REFCNT(op); in _PyLong_Init()
5483 Py_REFCNT(op) = refcnt + 1; in _PyLong_Init()
Ddescrobject.c1352 if (cached_args == NULL && Py_REFCNT(args) == 1) { in property_descr_get()
1359 assert(Py_REFCNT(args) >= 1); in property_descr_get()
Dmoduleobject.c50 Py_REFCNT(def) = 1; in PyModuleDef_Init()
Dbytesobject.c2925 if (Py_REFCNT(*pv) == 1 && PyBytes_CheckExact(*pv)) { in PyBytes_Concat()
3007 if (Py_REFCNT(v) != 1) { in _PyBytes_Resize()
3269 assert(Py_REFCNT(writer->buffer) == 1); in _PyBytesWriter_CheckConsistency()
/external/python/cpython3/Python/
Dpeephole.c245 assert(tabsiz == 0 || Py_REFCNT(lnotab_obj) == 1); in PyCode_Optimize()
/external/python/cpython3/Modules/_io/
Diobase.c305 is_zombie = (Py_REFCNT(self) == 0); in _PyIOBase_finalize()
Dbytesio.c47 #define SHARED_BUF(self) (Py_REFCNT((self)->buf) > 1)

123