diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index fe1a07f94bbf00bd76f74ee1376d0c02a7cca6f8..2a2a120a197685ccd5ba5fa1effa5f01869def0d 100644 --- a/pyopencl/cffi_cl.py +++ b/pyopencl/cffi_cl.py @@ -222,7 +222,10 @@ class _Common(object): _lib.clobj__delete(self.ptr) def __eq__(self, other): - return other == self.int_ptr + return other.int_ptr == self.int_ptr + + def __ne__(self, other): + return not self.__eq__(other) def __hash__(self): return _lib.clobj__int_ptr(self.ptr)