Fix runloop integration for libdispatch from swift

This commit is contained in:
Niels Grewe 2019-11-26 11:11:38 +01:00
parent 7d1a5cceb6
commit ecd2d85cb9
No known key found for this signature in database
GPG key ID: 99779549298DB83E
5 changed files with 41 additions and 23 deletions

View file

@ -62,7 +62,7 @@
#include <math.h>
#include <time.h>
#if HAVE_LIBDISPATCH_RUNLOOP
#if GS_USE_LIBDISPATCH_RUNLOOP
# define RL_INTEGRATE_DISPATCH 1
# ifdef HAVE_DISPATCH_H
# include <dispatch.h>
@ -403,7 +403,7 @@ static inline BOOL timerInvalidated(NSTimer *t)
#if HAVE_DISPATCH_GET_MAIN_QUEUE_HANDLE_NP
return (void*)(uintptr_t)dispatch_get_main_queue_handle_np();
#elif HAVE__DISPATCH_GET_MAIN_QUEUE_HANDLE_4CF
return (void*)_dispatch_get_main_queue_handle_4CF();
return (void*)(uintptr_t)_dispatch_get_main_queue_handle_4CF();
#else
#error libdispatch missing main queue handle function
#endif
@ -417,7 +417,7 @@ static inline BOOL timerInvalidated(NSTimer *t)
#if HAVE_DISPATCH_MAIN_QUEUE_DRAIN_NP
dispatch_main_queue_drain_np();
#elif HAVE__DISPATCH_MAIN_QUEUE_CALLBACK_4CF
_dispatch_main_queue_callback_4CF(NULL)
_dispatch_main_queue_callback_4CF(NULL);
#else
#error libdispatch missing main queue callback function
#endif