From 0ca4231b22f8d3fca4143242847a0dc61444f089 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 1 Dec 2010 11:56:20 -0500
Subject: [PATCH] Fix return of enqueue_map_{buffer,image}.

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

diff --git a/src/wrapper/wrap_cl.hpp b/src/wrapper/wrap_cl.hpp
index 6acdccbe..942d7d3c 100644
--- a/src/wrapper/wrap_cl.hpp
+++ b/src/wrapper/wrap_cl.hpp
@@ -2031,12 +2031,12 @@ namespace pyopencl
 
     PyArray_BYTES(result.get()) = reinterpret_cast<char *>(mapped);
 
-    py::handle<> array_py(handle_from_new_ptr(map.release()));
-    PyArray_BASE(result.get()) = array_py.get();
-    Py_INCREF(array_py.get());
+    py::handle<> map_py(handle_from_new_ptr(map.release()));
+    PyArray_BASE(result.get()) = map_py.get();
+    Py_INCREF(map_py.get());
 
     return py::make_tuple(
-        array_py,
+        result,
         handle_from_new_ptr(new event(evt_handle)));
   }
 
@@ -2092,12 +2092,12 @@ namespace pyopencl
         shape.size(), shape.empty( ) ? NULL : &shape.front(), /*strides*/ NULL,
         mapped, ary_flags, /*obj*/NULL));
 
-    py::handle<> array_py(handle_from_new_ptr(map.release()));
-    PyArray_BASE(result.get()) = array_py.get();
-    Py_INCREF(array_py.get());
+    py::handle<> map_py(handle_from_new_ptr(map.release()));
+    PyArray_BASE(result.get()) = map_py.get();
+    Py_INCREF(map_py.get());
 
     return py::make_tuple(
-        array_py,
+        result,
         handle_from_new_ptr(new event(evt_handle)),
         row_pitch, slice_pitch);
   }
-- 
GitLab