aboutsummaryrefslogtreecommitdiff
path: root/Foundation
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-03-22 13:30:12 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-03-22 13:30:12 +0000
commit35037b139d4db2639c78ee526d54fd6cbf8b3825 (patch)
tree44b8276e9c341894e644d12f01538c4f95480615 /Foundation
parent5a2410fb29ea63046f5147b871ad9cd957765b60 (diff)
[Author: thomasvl]
Fix build for older SDKs. Rename parameter to avoid issue with extra compiler flags. TBR=dmaclach
Diffstat (limited to 'Foundation')
-rw-r--r--Foundation/GTMNSThread+Blocks.h2
-rw-r--r--Foundation/GTMNSThread+Blocks.m4
-rw-r--r--Foundation/GTMNSThread+BlocksTest.m4
3 files changed, 7 insertions, 3 deletions
diff --git a/Foundation/GTMNSThread+Blocks.h b/Foundation/GTMNSThread+Blocks.h
index 4c649c2..755f1ce 100644
--- a/Foundation/GTMNSThread+Blocks.h
+++ b/Foundation/GTMNSThread+Blocks.h
@@ -31,7 +31,7 @@
// then this method will return.
- (void)gtm_performBlock:(void (^)())block;
-- (void)gtm_performWaitingUntilDone:(BOOL)wait block:(void (^)())block;
+- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)())block;
+ (void)gtm_performBlockInBackground:(void (^)())block;
@end
diff --git a/Foundation/GTMNSThread+Blocks.m b/Foundation/GTMNSThread+Blocks.m
index a752ea7..70ee5b6 100644
--- a/Foundation/GTMNSThread+Blocks.m
+++ b/Foundation/GTMNSThread+Blocks.m
@@ -34,11 +34,11 @@
}
}
-- (void)gtm_performWaitingUntilDone:(BOOL)wait block:(void (^)())block {
+- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)())block {
[NSThread performSelector:@selector(gtm_runBlockOnCurrentThread:)
onThread:self
withObject:[[block copy] autorelease]
- waitUntilDone:wait];
+ waitUntilDone:waitDone];
}
+ (void)gtm_performBlockInBackground:(void (^)())block {
diff --git a/Foundation/GTMNSThread+BlocksTest.m b/Foundation/GTMNSThread+BlocksTest.m
index 48fb715..fc3e561 100644
--- a/Foundation/GTMNSThread+BlocksTest.m
+++ b/Foundation/GTMNSThread+BlocksTest.m
@@ -19,6 +19,8 @@
#import "GTMSenTestCase.h"
#import "GTMNSThread+Blocks.h"
+#if NS_BLOCKS_AVAILABLE
+
#import "GTMFoundationUnitTestingUtilities.h"
@interface GTMNSThread_BlocksTest : GTMTestCase {
@@ -110,3 +112,5 @@
}
@end
+
+#endif // NS_BLOCKS_AVAILABLE