From bb93c2260adc390471e2fab90c2cf579ff78b21e Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 19 Jan 2011 12:18:13 -0500
Subject: [PATCH] Another attempted fix for Win32/64 CL-GL context creation.

---
 src/wrapper/wrap_cl.hpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/wrapper/wrap_cl.hpp b/src/wrapper/wrap_cl.hpp
index dbf312a4..4f07f1d7 100644
--- a/src/wrapper/wrap_cl.hpp
+++ b/src/wrapper/wrap_cl.hpp
@@ -729,8 +729,9 @@ namespace pyopencl
 #if defined(_WIN32)
        else if (prop == CL_WGL_HDC_KHR)
        {
-          HANDLE hnd = py::extract<HANDLE>(prop_tuple[1]);
-          props.push_back(hnd);
+         // size_t is a stand-in for HANDLE, hopefully has the same size.
+         size_t hnd = py::extract<size_t>(prop_tuple[1]);
+         props.push_back(hnd);
        }
 #endif
 #endif
-- 
GitLab