3#ifndef AWKWARDPY_UTIL_H_
4#define AWKWARDPY_UTIL_H_
6#include <pybind11/pybind11.h>
7#include <pybind11/numpy.h>
Used as a std::shared_ptr deleter (second argument) to overload delete ptr with Py_DECREF(ptr).
Definition util.h:26
void operator()(T const *)
Called by std::shared_ptr when its reference count reaches zero.
Definition util.h:34
pyobject_deleter(PyObject *pyobj)
Creates a pyobject_deleter and calls Py_INCREF(ptr).
Definition util.h:29