mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Merge pull request #87 from gnustep/swift-corelibs-libdispatch
Fix runloop integration for libdispatch from swift
This commit is contained in:
commit
c77f40f73c
5 changed files with 40 additions and 22 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue