From 07ad8cf74dddae2e95f195a6c94de808f40346f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20R=C3=B8yset?= Date: Sat, 10 Jul 2021 15:17:54 +0200 Subject: [PATCH] Fix compilation on 32-bit targets --- src/platform_impl/windows/event_loop.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 51954e5d2d..ad0239e55d 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -637,9 +637,7 @@ fn insert_event_target_window_data( }; let input_ptr = Box::into_raw(Box::new(userdata)); - unsafe { - winuser::SetWindowLongPtrW(thread_msg_target, winuser::GWL_USERDATA, input_ptr as isize) - }; + unsafe { winuser::SetWindowLongPtrW(thread_msg_target, winuser::GWL_USERDATA, input_ptr as _) }; tx } @@ -776,7 +774,7 @@ pub(super) unsafe extern "system" fn public_window_callback( if let Some((win, userdata)) = runner.catch_unwind(|| (initdata.post_init)(window)) { initdata.window = Some(win); let userdata = Box::into_raw(Box::new(userdata)); - winuser::SetWindowLongPtrW(window, winuser::GWL_USERDATA, userdata as LONG_PTR); + winuser::SetWindowLongPtrW(window, winuser::GWL_USERDATA, userdata as _); userdata } else { return -1;