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

Function Py_INCREF

python3-sys/src/object.rs:896–902  ·  view source on GitHub ↗
(op: *mut PyObject)

Source from the content-addressed store, hash-verified

894// Reference counting macros.
895#[inline(always)]
896pub unsafe fn Py_INCREF(op: *mut PyObject) {
897 if cfg!(py_sys_config = "Py_REF_DEBUG") {
898 Py_IncRef(op)
899 } else {
900 (*op).ob_refcnt += 1
901 }
902}
903
904#[inline(always)]
905pub unsafe fn Py_DECREF(op: *mut PyObject) {

Callers 2

Py_XINCREFFunction · 0.70
from_borrowed_ptrMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected