Merge pull request #1459 from mime29:macrowarning
Updated dispatch_ macro in order to avoid redefinition when included as Pod
This commit is contained in:
commit
e844a854ca
|
@ -99,11 +99,13 @@ typedef void(^SDWebImageNoParamsBlock)();
|
||||||
|
|
||||||
extern NSString *const SDWebImageErrorDomain;
|
extern NSString *const SDWebImageErrorDomain;
|
||||||
|
|
||||||
|
#ifndef dispatch_main_async_safe
|
||||||
#define dispatch_main_async_safe(block)\
|
#define dispatch_main_async_safe(block)\
|
||||||
if (strcmp(dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL), dispatch_queue_get_label(dispatch_get_main_queue())) == 0) {\
|
if (strcmp(dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL), dispatch_queue_get_label(dispatch_get_main_queue())) == 0) {\
|
||||||
block();\
|
block();\
|
||||||
} else {\
|
} else {\
|
||||||
dispatch_async(dispatch_get_main_queue(), block);\
|
dispatch_async(dispatch_get_main_queue(), block);\
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int64_t kAsyncTestTimeout = 5;
|
static int64_t kAsyncTestTimeout = 5;
|
||||||
|
|
Loading…
Reference in New Issue