From 6dd4f874167fb94a56a5481742ca83e6791761ce Mon Sep 17 00:00:00 2001
From: Jerome Kieffer <kieffer@lintaillefer.esrf.fr>
Date: Mon, 18 Dec 2017 14:40:21 +0100
Subject: [PATCH] Support for python2 on windows where types are "long", not
 "int" by default

---
 pyopencl/cffi_cl.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py
index 826fd036..b446212f 100644
--- a/pyopencl/cffi_cl.py
+++ b/pyopencl/cffi_cl.py
@@ -338,7 +338,7 @@ class device_type(_ConstantsNamespace):  # noqa
                 continue
             if not name.startswith("_"):
                 bitfield = getattr(cls, name)
-                if isinstance(bitfield, int) and ((bitfield & value) == bitfield):
+                if isinstance(bitfield, six.integer_types) and ((bitfield & value) == bitfield):
                     return name
 
         if default_format is None:
-- 
GitLab