From 852e41397ff6e65ab4e1dfbb913b34df0cb0f197 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Mon, 18 Jan 2021 16:19:17 -0600
Subject: [PATCH] Wrapper: switch some C++ args from py::object to py::handle

---
 src/wrap_cl.hpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp
index 20db54ba..7a6f056f 100644
--- a/src/wrap_cl.hpp
+++ b/src/wrap_cl.hpp
@@ -4371,7 +4371,7 @@ namespace pyopencl
             (m_kernel, arg_index, sizeof(cl_command_queue), &q));
       }
 
-      void set_arg_buf(cl_uint arg_index, py::object py_buffer)
+      void set_arg_buf(cl_uint arg_index, py::handle py_buffer)
       {
         const void *buf;
         PYOPENCL_BUFFER_SIZE_T len;
@@ -4404,7 +4404,7 @@ namespace pyopencl
       }
 #endif
 
-      void set_arg(cl_uint arg_index, py::object arg)
+      void set_arg(cl_uint arg_index, py::handle arg)
       {
         if (arg.ptr() == Py_None)
         {
@@ -4642,10 +4642,10 @@ namespace pyopencl
   event *enqueue_nd_range_kernel(
       command_queue &cq,
       kernel &knl,
-      py::object py_global_work_size,
-      py::object py_local_work_size,
-      py::object py_global_work_offset,
-      py::object py_wait_for,
+      py::handle py_global_work_size,
+      py::handle py_local_work_size,
+      py::handle py_global_work_offset,
+      py::handle py_wait_for,
       bool g_times_l,
       bool allow_empty_ndrange)
   {
-- 
GitLab