From 1cd0b687d693304f5832267d8ad4f8beae78f7d3 Mon Sep 17 00:00:00 2001 From: Enric Tejedor Saavedra <enric.tejedor.saavedra@cern.ch> Date: Tue, 19 Feb 2019 10:05:23 +0100 Subject: [PATCH] [Exp PyROOT] Add comment about ownership of returned value --- bindings/pyroot_experimental/PyROOT/src/TClonesArrayPyz.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/pyroot_experimental/PyROOT/src/TClonesArrayPyz.cxx b/bindings/pyroot_experimental/PyROOT/src/TClonesArrayPyz.cxx index 09888a4af64..112c5d1c4aa 100644 --- a/bindings/pyroot_experimental/PyROOT/src/TClonesArrayPyz.cxx +++ b/bindings/pyroot_experimental/PyROOT/src/TClonesArrayPyz.cxx @@ -83,6 +83,7 @@ static PyObject *PyStyleIndex(PyObject *self, PyObject *index) pyindex = PyLong_FromSsize_t(size + idx); } + // We transfer ownership to the caller, who needs to decref return pyindex; } -- GitLab