We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de78ffd commit 5633306Copy full SHA for 5633306
1 file changed
winit-win32/src/event_loop.rs
@@ -528,9 +528,11 @@ fn main_thread_id() -> u32 {
528
//
529
// See: https://doc.rust-lang.org/stable/reference/abi.html#the-link_section-attribute
530
#[unsafe(link_section = ".CRT$XCU")]
531
- static INIT_MAIN_THREAD_ID: unsafe fn() = {
532
- unsafe fn initer() {
533
- unsafe { MAIN_THREAD_ID = GetCurrentThreadId() };
+ static INIT_MAIN_THREAD_ID: unsafe extern "C" fn() = {
+ unsafe extern "C" fn initer() {
+ unsafe {
534
+ MAIN_THREAD_ID = GetCurrentThreadId();
535
+ }
536
}
537
initer
538
};
0 commit comments