Skip to content

Commit c3b9b8e

Browse files
committed
queue: expose _dispatch_get_main_queue_port_4CF
This was being re-implemented in CF by means of a macro. Just expose the function instead.
1 parent bbde530 commit c3b9b8e

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

private/private.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,10 @@ typedef void *dispatch_runloop_handle_t;
197197
#error "runloop support not implemented on this platform"
198198
#endif
199199

200-
#if TARGET_OS_MAC
201200
API_AVAILABLE(macos(10.6), ios(4.0))
202201
DISPATCH_EXPORT DISPATCH_CONST DISPATCH_WARN_RESULT DISPATCH_NOTHROW
203202
dispatch_runloop_handle_t
204203
_dispatch_get_main_queue_port_4CF(void);
205-
#endif
206204

207205
API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0), watchos(3.0))
208206
DISPATCH_EXPORT DISPATCH_NOTHROW
@@ -221,12 +219,12 @@ dispatch_queue_serial_t
221219
_dispatch_runloop_root_queue_create_4CF(const char *_Nullable label,
222220
unsigned long flags);
223221

224-
#if TARGET_OS_MAC || defined(_WIN32)
225222
API_AVAILABLE(macos(10.9), ios(7.0))
226223
DISPATCH_EXPORT DISPATCH_WARN_RESULT DISPATCH_NOTHROW
227224
dispatch_runloop_handle_t
228225
_dispatch_runloop_root_queue_get_port_4CF(dispatch_queue_t queue);
229226

227+
#if TARGET_OS_MAC
230228
API_AVAILABLE(macos(10.13.2), ios(11.2), tvos(11.2), watchos(4.2))
231229
DISPATCH_EXPORT DISPATCH_WARN_RESULT DISPATCH_NOTHROW
232230
bool

src/queue.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6939,13 +6939,11 @@ _dispatch_get_main_queue_handle_4CF(void)
69396939
return _dispatch_runloop_queue_get_handle(dq->_as_dl);
69406940
}
69416941

6942-
#if TARGET_OS_MAC
69436942
dispatch_runloop_handle_t
69446943
_dispatch_get_main_queue_port_4CF(void)
69456944
{
69466945
return _dispatch_get_main_queue_handle_4CF();
69476946
}
6948-
#endif
69496947

69506948
void
69516949
_dispatch_main_queue_callback_4CF(

0 commit comments

Comments
 (0)