Skip to main content

Module refcount

Module refcount 

Source

Re-exportsยง

use crate::PyObject; ๐Ÿ”’
use crate::pyport::Py_ssize_t; ๐Ÿ”’
use core::ffi::c_int; ๐Ÿ”’ Py_3_12 and non-PyPy, or py_sys_config=Py_REF_DEBUG and non-Py_LIMITED_API
use core::ffi::c_long; ๐Ÿ”’ Py_3_14 and (32-bit or non-Py_GIL_DISABLED)
use core::ffi::c_ulong; ๐Ÿ”’ Py_3_14 and non-Py_GIL_DISABLED
use core::ptr; ๐Ÿ”’

Constantsยง

_Py_IMMORTAL_INITIAL_REFCNT ๐Ÿ”’ Py_3_14 and non-Py_GIL_DISABLED
_Py_STATICALLY_ALLOCATED_FLAG ๐Ÿ”’ Py_3_14 and non-Py_3_15
_Py_STATIC_IMMORTAL_INITIAL_REFCNT ๐Ÿ”’ Py_3_14 and non-Py_GIL_DISABLED

Functionsยง

Py_CLEARโš 
Py_DECREFโš 
Py_DecRefโš 
Py_INCREFโš 
Py_IncRefโš 
Py_NewRefโš Py_3_10
Py_REFCNTโš Not (Py_3_14 and Py_LIMITED_API)
Py_XDECREFโš 
Py_XINCREFโš 
Py_XNewRefโš Py_3_10
_Py_Dealloc ๐Ÿ”’ โš 
_Py_DecRef ๐Ÿ”’ โš Py_3_10 and non-PyPy
_Py_IncRef ๐Ÿ”’ โš Py_3_10 and non-PyPy
_Py_IsImmortal ๐Ÿ”’ โš Py_3_12 and non-PyPy and not (Py_GIL_DISABLED and Py_LIMITED_API)
โš ๏ธ Internal Docs โš ๏ธ Not Public API ๐Ÿ‘‰ Official Docs Here