From 21008183734b9d13ae2c40ea2e3bdec20ac70250 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Fri, 14 Apr 2017 10:19:14 -0500
Subject: [PATCH] Fix GL interop (patch by Aaron Myles Landwehr)

---
 pyopencl/cffi_cl.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py
index c2e87ca1..f4d55faa 100644
--- a/pyopencl/cffi_cl.py
+++ b/pyopencl/cffi_cl.py
@@ -742,9 +742,9 @@ def _parse_context_properties(properties):
                 'CGL_SHAREGROUP_KHR',
                 )]:
 
-            from ctypes import _Pointer, addressof
+            from ctypes import _Pointer, cast
             if isinstance(value, _Pointer):
-                val = addressof(value)
+                val = cast(value, ctypes.c_void_p).value
             else:
                 val = int(value)
 
-- 
GitLab