Browse files

fix CWFoundation, CWSerialBlockQueue and CWTask to use new api

  • Loading branch information...
1 parent a326a13 commit 036b92319e9ea0cdc60eac6cc98b70045008e084 @Machx committed Mar 31, 2013
Showing with 5 additions and 5 deletions.
  1. +1 −1 Source/CWFoundation.m
  2. +3 −3 Source/CWSerialBlockQueue.m
  3. +1 −1 Source/CWTask.m
View
2 Source/CWFoundation.m
@@ -41,7 +41,7 @@ void CWNextRunLoop(dispatch_block_t block) {
static dispatch_queue_t queue = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
- const char *label = CWUUIDCStringPrependedWithString(@"com.Zangetsu.CWFoundation-CWNextRunLoop");
+ const char *label = [CWUUIDStringPrependedWithString(@"com.Zangetsu.CWFoundation-CWNextRunLoop") UTF8String];
queue = dispatch_queue_create(label, DISPATCH_QUEUE_SERIAL);
});
dispatch_async(queue, ^{
View
6 Source/CWSerialBlockQueue.m
@@ -60,7 +60,7 @@ @implementation CWSerialBlockQueue
- (id)init {
self = [super init];
if (self) {
- _queue = dispatch_queue_create(CWUUIDCStringPrependedWithString(@"com.Zangetsu.CWSerialBlockQueue-"), DISPATCH_QUEUE_SERIAL);
+ _queue = dispatch_queue_create([CWUUIDStringPrependedWithString(@"com.Zangetsu.CWSerialBlockQueue-") UTF8String], DISPATCH_QUEUE_SERIAL);
}
return self;
}
@@ -71,7 +71,7 @@ -(id)initWithLabel:(NSString *)qLabel {
if (qLabel) {
_queue = dispatch_queue_create([qLabel UTF8String], DISPATCH_QUEUE_SERIAL);
} else {
- _queue = dispatch_queue_create(CWUUIDCStringPrependedWithString(@"com.Zangetsu.CWSerialBlockQueue-"), DISPATCH_QUEUE_SERIAL);
+ _queue = dispatch_queue_create([CWUUIDStringPrependedWithString(@"com.Zangetsu.CWSerialBlockQueue-") UTF8String], DISPATCH_QUEUE_SERIAL);
}
}
return self;
@@ -83,7 +83,7 @@ -(id)initWithLabel:(NSString *)qLabel andBlockOperationObjects:(NSArray *)blockO
if (qLabel) {
_queue = dispatch_queue_create([qLabel UTF8String], DISPATCH_QUEUE_SERIAL);
} else {
- _queue = dispatch_queue_create(CWUUIDCStringPrependedWithString(@"com.Zangetsu.CWSerialBlockQueue-"), DISPATCH_QUEUE_SERIAL);
+ _queue = dispatch_queue_create([CWUUIDStringPrependedWithString(@"com.Zangetsu.CWSerialBlockQueue-") UTF8String], DISPATCH_QUEUE_SERIAL);
}
for (CWSerialBlockOperation *op in blockOperations) {
dispatch_async(_queue, ^{ op.operationBlock(); });
View
2 Source/CWTask.m
@@ -248,7 +248,7 @@ - (void) _performPostRunActionsIfApplicable {
-(void)launchTaskWithResult:(void (^)(NSString *output, NSError *error))block {
NSString *uLabel = [NSString stringWithFormat:@"com.CWTask.%@_",self.executable];
- const char *uniqueLabel = CWUUIDCStringPrependedWithString(uLabel);
+ const char *uniqueLabel = [CWUUIDStringPrependedWithString(uLabel) UTF8String];
dispatch_queue_t queue = dispatch_queue_create(uniqueLabel, DISPATCH_QUEUE_SERIAL);
self.inAsynchronous = YES;
dispatch_async(queue, ^{

0 comments on commit 036b923

Please sign in to comment.