Browse files

[Author: thomasvl]

Fix build for older SDKs.
Rename parameter to avoid issue with extra compiler flags.

TBR=dmaclach

git-svn-id: http://google-toolbox-for-mac.googlecode.com/svn/trunk@526 7dc7ac4e-7543-0410-b95c-c1676fc8e2a3
  • Loading branch information...
1 parent a663f1a commit bdc5b5e3a27e894b11f837de79f6da4cf9b089b3 gtm.daemon committed Mar 22, 2012
Showing with 7 additions and 3 deletions.
  1. +1 −1 Foundation/GTMNSThread+Blocks.h
  2. +2 −2 Foundation/GTMNSThread+Blocks.m
  3. +4 −0 Foundation/GTMNSThread+BlocksTest.m
View
2 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
View
4 Foundation/GTMNSThread+Blocks.m
@@ -34,11 +34,11 @@ - (void)gtm_performBlock:(void (^)())block {
}
}
-- (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 {
View
4 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 @@ - (void)testPerformBlockInBackground {
}
@end
+
+#endif // NS_BLOCKS_AVAILABLE

0 comments on commit bdc5b5e

Please sign in to comment.