Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 4 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
2  Source/CWBlockQueue.m
@@ -148,7 +148,7 @@ +(CWBlockQueue *)globalDefaultQueue {
}
+(void)executeBlockOnTemporaryQueue:(dispatch_block_t)block {
- const char *label = CWUUIDCStringPrependedWithString(@"com.Zangetsu.CWBlockQueue_TemporaryQueue_");
+ const char *label = [CWUUIDStringPrependedWithString(@"com.Zangetsu.CWBlockQueue_TemporaryQueue_") UTF8String];
dispatch_queue_t tempQueue = dispatch_queue_create(label, DISPATCH_QUEUE_SERIAL);
dispatch_async(tempQueue, block);
dispatch_release(tempQueue);
View
8 Source/CWFoundation.h
@@ -51,14 +51,6 @@ BOOL CWClassExists(NSString * class);
NSString *CWUUIDStringPrependedWithString(NSString *preString);
/**
- Returns a unique c string prepended by the passed in string
-
- @param preString the string to be prepended on the unique string
- @return C String with a UUID String prepended with the prestring argument
- */
-const char *CWUUIDCStringPrependedWithString(NSString *preString);
-
-/**
Schedules the block to be executed on the next run loop on the main thread
@param block the block to be executed on the next runloop on the main thread
View
6 Source/CWFoundation.m
@@ -37,15 +37,11 @@ BOOL CWClassExists(NSString * class) {
return [NSString stringWithFormat:@"%@%@",preString,[NSString cw_uuidString]];
}
-const char *CWUUIDCStringPrependedWithString(NSString *preString) {
- return [CWUUIDStringPrependedWithString(preString) UTF8String];
-}
-
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, ^{
View
2  Source/CWURLRequest.m
@@ -142,7 +142,7 @@ -(NSData *)startSynchronousConnection {
}
-(void)startAsynchronousConnectionWithCompletionBlock:(void (^)(NSData *data, NSError *error, NSURLResponse *response))block {
- const char *label = CWUUIDCStringPrependedWithString(@"com.Zangetsu.CWURLRequest");
+ const char *label = [CWUUIDStringPrependedWithString(@"com.Zangetsu.CWURLRequest") UTF8String];
dispatch_queue_t queue = dispatch_queue_create(label, 0);
dispatch_async(queue, ^{
NSData *data = [self startSynchronousConnection];
View
2  Source/NSStringAdditions.m
@@ -39,7 +39,7 @@ +(NSString *)cw_uuidString {
- (void)cw_enumerateConcurrentlyWithOptions:(NSStringEnumerationOptions)options
usingBlock:(void (^)(NSString *substring))block {
dispatch_group_t group = dispatch_group_create();
- const char *queueLabel = CWUUIDCStringPrependedWithString(@"com.Zangetsu.NSString_");
+ const char *queueLabel = [CWUUIDStringPrependedWithString(@"com.Zangetsu.NSString_") UTF8String];
dispatch_queue_t queue = dispatch_queue_create(queueLabel, DISPATCH_QUEUE_CONCURRENT);
[self enumerateSubstringsInRange:NSMakeRange(0, [self length])

No commit comments for this range

Something went wrong with that request. Please try again.