From 6c576116cbd06826703b6b3f699f098d61d1d268 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sun, 26 Jun 2011 12:14:59 -0400
Subject: [PATCH] Fix use of SliceObject in wrapper (fix by Christoph Gohlke).

---
 src/wrapper/wrap_cl.hpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/wrapper/wrap_cl.hpp b/src/wrapper/wrap_cl.hpp
index 233ea32a..a33adc98 100644
--- a/src/wrapper/wrap_cl.hpp
+++ b/src/wrapper/wrap_cl.hpp
@@ -1188,7 +1188,11 @@ namespace pyopencl
         PYOPENCL_CALL_GUARDED(clGetMemObjectInfo,
             (data(), CL_MEM_SIZE, sizeof(my_length), &my_length, 0));
 
+#if PY_VERSION_HEX >= 0x03020000
+        if (PySlice_GetIndicesEx(slc.ptr(),
+#else
         if (PySlice_GetIndicesEx(reinterpret_cast<PySliceObject *>(slc.ptr()),
+#endif
               my_length, &start, &end, &stride, &length) != 0)
           throw py::error_already_set();
 
-- 
GitLab