From e2ff2310ce1c5eaefd30067ff63de136b51ce532 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 27 Jun 2015 21:54:48 -0500 Subject: [PATCH] PEP8 fixes --- pyopencl/_cffi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyopencl/_cffi.py b/pyopencl/_cffi.py index 6df057d6..3944bbf1 100644 --- a/pyopencl/_cffi.py +++ b/pyopencl/_cffi.py @@ -215,6 +215,8 @@ import gc _py_gc = _ffi.callback('int(void)')(gc.collect) _pyrefs = {} + + @_ffi.callback('void(void*)') def _py_deref(handle): try: @@ -222,6 +224,7 @@ def _py_deref(handle): except: pass + # return a new reference of the object pointed to by the handle. # The return value might be different with the input (on PyPy). # _py_deref should be called (once) when the object is not needed anymore. @@ -232,6 +235,7 @@ def _py_ref(handle): _pyrefs[handle] = handle return handle + @_ffi.callback('void(void*, cl_int)') def _py_call(handle, status): _ffi.from_handle(handle)(status) -- GitLab