From ef8c0a55d5ecf10e66e2157cdd935bde7e00cd95 Mon Sep 17 00:00:00 2001 From: Yichao Yu <yyc1992@gmail.com> Date: Tue, 24 Jun 2014 07:59:37 +0800 Subject: [PATCH] remove hack from Program, it is not done in master branch and should not be in the backends if needed --- pyopencl/cffi_cl.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index 179a6c12..03c9ae5a 100644 --- a/pyopencl/cffi_cl.py +++ b/pyopencl/cffi_cl.py @@ -111,19 +111,12 @@ def _generic_info_to_python(info): _lib.CLASS_COMMAND_QUEUE: CommandQueue }[info.opaque_class] - def ci(ptr): - ins = klass._create(ptr) - if info.opaque_class == _lib.CLASS_PROGRAM: # TODO: HACK? - from . import Program - return Program(ins) - return ins - if type_.endswith(']'): - ret = map(ci, value) + ret = map(klass._create, value) _lib.free_pointer(info.value) return ret else: - return ci(value) + return klass._create(value) if type_ == 'char*': ret = _ffi_pystr(value) elif type_.startswith('char*['): -- GitLab