aboutsummaryrefslogtreecommitdiff
path: root/Foundation
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2017-10-06 13:20:18 -0400
committerGravatar Thomas Van Lenten <thomasvl@google.com>2017-10-06 13:37:34 -0400
commit4fdef15a32fe666a90073ffe00da4779d7902a65 (patch)
tree5b9a7367b85c0a19dddccef5c35b7f48c50be7d4 /Foundation
parente2292328d8337e577be7b986e5855d76b6d5c14a (diff)
Fixing block types to support -Wstrict-prototypes.
Diffstat (limited to 'Foundation')
-rw-r--r--Foundation/GTMNSThread+Blocks.h6
-rw-r--r--Foundation/GTMNSThread+Blocks.m8
2 files changed, 7 insertions, 7 deletions
diff --git a/Foundation/GTMNSThread+Blocks.h b/Foundation/GTMNSThread+Blocks.h
index e3700bb..17bfbc7 100644
--- a/Foundation/GTMNSThread+Blocks.h
+++ b/Foundation/GTMNSThread+Blocks.h
@@ -30,10 +30,10 @@
// and this method returns immediately.
// If self is the current thread, the block will be performed immediately, and
// then this method will return.
-- (void)gtm_performBlock:(void (^)())block;
+- (void)gtm_performBlock:(void (^)(void))block;
-- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)())block;
-+ (void)gtm_performBlockInBackground:(void (^)())block;
+- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)(void))block;
++ (void)gtm_performBlockInBackground:(void (^)(void))block;
@end
#endif // NS_BLOCKS_AVAILABLE
diff --git a/Foundation/GTMNSThread+Blocks.m b/Foundation/GTMNSThread+Blocks.m
index 4ab3ee5..8318193 100644
--- a/Foundation/GTMNSThread+Blocks.m
+++ b/Foundation/GTMNSThread+Blocks.m
@@ -25,11 +25,11 @@
@implementation NSThread (GTMBlocksAdditions)
-+ (void)gtm_runBlockOnCurrentThread:(void (^)())block {
++ (void)gtm_runBlockOnCurrentThread:(void (^)(void))block {
block();
}
-- (void)gtm_performBlock:(void (^)())block {
+- (void)gtm_performBlock:(void (^)(void))block {
if ([[NSThread currentThread] isEqual:self]) {
block();
} else {
@@ -37,14 +37,14 @@
}
}
-- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)())block {
+- (void)gtm_performWaitingUntilDone:(BOOL)waitDone block:(void (^)(void))block {
[NSThread performSelector:@selector(gtm_runBlockOnCurrentThread:)
onThread:self
withObject:[[block copy] autorelease]
waitUntilDone:waitDone];
}
-+ (void)gtm_performBlockInBackground:(void (^)())block {
++ (void)gtm_performBlockInBackground:(void (^)(void))block {
[NSThread performSelectorInBackground:@selector(gtm_runBlockOnCurrentThread:)
withObject:[[block copy] autorelease]];
}