Merge pull request #87 from gnustep/swift-corelibs-libdispatch

Fix runloop integration for libdispatch from swift
This commit is contained in:
Niels Grewe 2019-12-06 23:05:38 +01:00 committed by GitHub
commit c77f40f73c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 22 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