Header python_ptr.h¶
Smart pointer support for CPython objects. Needs the Python C API headers.
-
template<class T>
using py_ptr = intrusive_shared_ptr<T, py_traits>¶ An
intrusive_shared_ptrfor Python objects, counted withPy_INCREFandPy_DECREF.Tis normallyPyObjectorPyTypeObject.
-
struct py_traits¶
Calls
Py_INCREFto add a reference andPy_DECREFto drop one, forPyObjectandPyTypeObject.