Merge pull request #1459 from mime29:macrowarning

Updated dispatch_ macro in order to avoid redefinition when included as Pod
This commit is contained in:
Bogdan Poplauschi 2016-10-01 09:52:40 +03:00
commit e844a854ca
1 changed files with 2 additions and 0 deletions

View File

@ -99,11 +99,13 @@ typedef void(^SDWebImageNoParamsBlock)();
extern NSString *const SDWebImageErrorDomain;
#ifndef dispatch_main_async_safe
#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) {\
block();\
} else {\
dispatch_async(dispatch_get_main_queue(), block);\
}
#endif
static int64_t kAsyncTestTimeout = 5;