This commit is contained in:
Hans Dembinski
2017-09-01 00:51:26 +02:00
parent a7bf7f6129
commit 83e4fcc8a2

View File

@@ -222,13 +222,17 @@ python::object histogram_init(python::tuple args, python::dict kwargs) {
struct fetcher {
char type = 0;
union {
#ifdef HAVE_NUMPY
PyArrayObject* a;
#endif
double value;
};
~fetcher() {
#ifdef HAVE_NUMPY
~fetcher() {
if (type == 2) Py_DECREF((PyObject*)a);
}
#endif
long connect(python::object o) {
python::extract<double> get_double(o);