Skip to content

Commit bf57964

Browse files
committed
RunLoop: use _dispatch_get_main_queue_port_4CF
Rather than masking the function with a macro, now that it is exposed on all targets, just use it directly.
1 parent 2e4aa1c commit bf57964

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: CoreFoundation/RunLoop.subproj/CFRunLoop.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ extern bool _dispatch_runloop_root_queue_perform_4CF(dispatch_queue_t queue);
7474
typedef mach_port_t dispatch_runloop_handle_t;
7575
#elif defined(__linux__) || defined(__FreeBSD__)
7676
typedef int dispatch_runloop_handle_t;
77+
#elif TARGET_OS_WIN32
78+
typedef HANDLE dispatch_runloop_handle_t;
7779
#endif
7880

7981
#endif
@@ -100,13 +102,12 @@ extern mach_port_t _dispatch_get_main_queue_port_4CF(void);
100102

101103
#elif TARGET_OS_WIN32 || TARGET_OS_CYGWIN
102104
#include <process.h>
103-
DISPATCH_EXPORT HANDLE _dispatch_get_main_queue_handle_4CF(void);
105+
DISPATCH_EXPORT dispatch_runloop_handle_t _dispatch_get_main_queue_port_4CF(void);
104106
DISPATCH_EXPORT void _dispatch_main_queue_callback_4CF(void * _Null_unspecified);
105107

106108
#define MACH_PORT_NULL 0
107109
#define mach_port_name_t HANDLE
108110
#define mach_port_t HANDLE
109-
#define _dispatch_get_main_queue_port_4CF _dispatch_get_main_queue_handle_4CF
110111

111112
#elif DEPLOYMENT_TARGET_LINUX
112113

@@ -116,10 +117,9 @@ DISPATCH_EXPORT void _dispatch_main_queue_callback_4CF(void * _Null_unspecified)
116117
#include <sys/eventfd.h>
117118
#include <sys/timerfd.h>
118119

119-
dispatch_runloop_handle_t _dispatch_get_main_queue_handle_4CF(void);
120+
dispatch_runloop_handle_t _dispatch_get_main_queue_port_4CF(void);
120121
extern void _dispatch_main_queue_callback_4CF(void *_Null_unspecified msg);
121122

122-
#define _dispatch_get_main_queue_port_4CF _dispatch_get_main_queue_handle_4CF
123123
#endif
124124

125125
#if DEPLOYMENT_TARGET_WINDOWS || DEPLOYMENT_TARGET_LINUX

0 commit comments

Comments
 (0)