MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / Py_DECREF

Function Py_DECREF

python27-sys/src/object.rs:804–813  ·  view source on GitHub ↗
(op: *mut PyObject)

Source from the content-addressed store, hash-verified

802
803#[inline(always)]
804pub unsafe fn Py_DECREF(op: *mut PyObject) {
805 if cfg!(py_sys_config = "Py_REF_DEBUG") || cfg!(py_sys_config = "COUNT_ALLOCS") {
806 Py_DecRef(op)
807 } else {
808 (*op).ob_refcnt -= 1;
809 if (*op).ob_refcnt == 0 {
810 (*Py_TYPE(op)).tp_dealloc.unwrap()(op)
811 }
812 }
813}
814
815#[inline(always)]
816pub unsafe fn Py_CLEAR(op: &mut *mut PyObject) {

Callers 2

Py_CLEARFunction · 0.70
Py_XDECREFFunction · 0.70

Calls 1

Py_TYPEFunction · 0.70

Tested by

no test coverage detected