Skip to content

Commit

Permalink
fix CWFoundation, CWSerialBlockQueue and CWTask to use new api
Browse files Browse the repository at this point in the history
  • Loading branch information
Machx committed Mar 31, 2013
1 parent a326a13 commit 036b923
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/CWFoundation.m
Expand Up @@ -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, ^{
Expand Down
6 changes: 3 additions & 3 deletions Source/CWSerialBlockQueue.m
Expand Up @@ -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;
}
Expand All @@ -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;
Expand All @@ -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(); });
Expand Down
2 changes: 1 addition & 1 deletion Source/CWTask.m
Expand Up @@ -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, ^{
Expand Down

0 comments on commit 036b923

Please sign in to comment.