Home
last modified time | relevance | path

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

12

/third_party/boost/libs/python/test/
Dupcast.cpp16 BOOST_TEST(&Py_REFCNT(boost::python::upcast<PyObject>(&o)) == &Py_REFCNT(&o)); in main()
17 BOOST_TEST(&Py_REFCNT(boost::python::upcast<PyObject>(&y)) == &Py_REFCNT(&y)); in main()
/third_party/boost/boost/python/
Drefcount.hpp30 assert( Py_REFCNT(python::upcast<PyObject>(p)) > 0 ); in decref()
37 assert( !p || Py_REFCNT(python::upcast<PyObject>(p)) > 0 ); in xdecref()
Dobject_core.hpp422 assert( Py_REFCNT(m_ptr) > 0 ); in ~object_base()
/third_party/python/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.c126 if (Py_REFCNT(result) == 1) { in enum_next_long()
176 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.c81 if (Py_REFCNT(x) == 1) { in _PyLong_Negate()
3253 assert(Py_REFCNT(z) == 1); in long_add()
3286 assert(Py_SIZE(z) == 0 || Py_REFCNT(z) == 1); in long_sub()
4640 assert(Py_REFCNT(z) == 1); in long_lshift1()
4975 else if (Py_REFCNT(a) == 1) { in _PyLong_GCD()
4989 else if (Py_REFCNT(b) == 1 && size_a <= alloc_b) { in _PyLong_GCD()
5040 assert(Py_REFCNT(a) > 0); in _PyLong_GCD()
5041 assert(Py_REFCNT(b) > 0); in _PyLong_GCD()
Dstructseq.c400 if (Py_REFCNT(type) != 0) { in PyStructSequence_InitType2()
Dbytesobject.c2939 if (Py_REFCNT(*pv) == 1 && PyBytes_CheckExact(*pv)) { in PyBytes_Concat()
3020 if (Py_REFCNT(v) != 1) { in _PyBytes_Resize()
3288 assert(Py_REFCNT(writer->buffer) == 1); in _PyBytesWriter_CheckConsistency()
Dcall.c332 if (Py_REFCNT(f) > 1) { in function_code_fastcall()
Dodictobject.c1814 if (Py_REFCNT(result) == 1) { in odictiter_iternext()
/third_party/python/Include/
Dweakrefobject.h78 (Py_REFCNT(((PyWeakReference *)(ref))->wr_object) > 0 \
Dobject.h123 #define Py_REFCNT(ob) (_PyObject_CAST(ob)->ob_refcnt) macro
/third_party/boost/boost/python/detail/
Dwrap_python.hpp225 # define Py_REFCNT(o) (((PyObject*)(o))->ob_refcnt) macro
/third_party/python/Modules/
Ditertoolsmodule.c530 Py_REFCNT(obj) == 1) { in teedataobject_safe_decref()
2241 if (Py_REFCNT(result) > 1) { in product_next()
2255 assert (npools==0 || Py_REFCNT(result) == 1); in product_next()
2569 if (Py_REFCNT(result) > 1) { in combinations_next()
2586 assert(r == 0 || Py_REFCNT(result) == 1); in combinations_next()
2908 if (Py_REFCNT(result) > 1) { in cwr_next()
2923 assert(r == 0 || Py_REFCNT(result) == 1); in cwr_next()
3257 if (Py_REFCNT(result) > 1) { in permutations_next()
3271 assert(r == 0 || Py_REFCNT(result) == 1); in permutations_next()
4512 if (Py_REFCNT(result) == 1) { in zip_longest_next()
D_functoolsmodule.c90 else if (Py_REFCNT(kw) == 1) { in partial_new()
654 if (Py_REFCNT(args) > 1) { in functools_reduce()
671 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 …]
Dgcmodule.c414 gc_reset_refs(gc, Py_REFCNT(FROM_GC(gc))); in update_refs()
991 _PyObject_ASSERT_WITH_MSG(op, Py_REFCNT(op) > 0, in delete_garbage()
D_zoneinfo.c2629 if (TIMEDELTA_CACHE != NULL && Py_REFCNT(TIMEDELTA_CACHE) > 1) { in module_free()
2635 if (ZONEINFO_WEAK_CACHE != NULL && Py_REFCNT(ZONEINFO_WEAK_CACHE) > 1) { in module_free()
/third_party/python/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)
/third_party/python/Python/
Dpeephole.c252 assert(tabsiz == 0 || Py_REFCNT(lnotab_obj) == 1); in PyCode_Optimize()
/third_party/python/Modules/_io/
Diobase.c316 is_zombie = (Py_REFCNT(self) == 0); in _PyIOBase_finalize()
Dbytesio.c65 #define SHARED_BUF(self) (Py_REFCNT((self)->buf) > 1)

12