diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index 456813b2f56fd9b70d3e22f3a8ae33d9dfe9264c..560fd7562d93c381969d716e973c2c3644bbebcc 100644 --- a/pyopencl/cffi_cl.py +++ b/pyopencl/cffi_cl.py @@ -251,6 +251,8 @@ def _constant_callback(type_, name, value): _lib.populate_constants(_constant_callback) for type_, d in _constants.iteritems(): + if sys.version_info >= (3,): + type_ = type_.decode() locals()[type_] = type(type_, (_NoInit,), d) # }}}