aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/apache/arrow/patches/fix-ARROW-15511.patch
blob: dd20656ee7c9de1f5576d2704e9040962ef8aa84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/cpp/src/arrow/python/numpy_internal.h
+++ b/cpp/src/arrow/python/numpy_internal.h
@@ -43,12 +43,11 @@ class Ndarray1DIndexer {
   explicit Ndarray1DIndexer(PyArrayObject* arr) : Ndarray1DIndexer() {
     arr_ = arr;
     DCHECK_EQ(1, PyArray_NDIM(arr)) << "Only works with 1-dimensional arrays";
-    Py_INCREF(arr);
     data_ = reinterpret_cast<uint8_t*>(PyArray_DATA(arr));
     stride_ = PyArray_STRIDES(arr)[0];
   }
 
-  ~Ndarray1DIndexer() { Py_XDECREF(arr_); }
+  ~Ndarray1DIndexer() = default;
 
   int64_t size() const { return PyArray_SIZE(arr_); }