Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 3 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Jun 17, 2012
@jwilling jwilling change small bridging error 8351b6c
@jwilling jwilling sigh, signature changed in 10.8 & iOS 6 e83c735
@mikeash Merge pull request #14 from jwilling/master
Fix a small bridging error due to changed signature for `imp_implementationWithBlock` in 10.8/iOS6 SDKs.
d464913
Showing with 5 additions and 0 deletions.
  1. +5 −0 MAKVONotificationCenter.m
View
5 MAKVONotificationCenter.m
@@ -323,7 +323,12 @@ - (void)_swizzleObjectClassIfNeeded:(id)object
SEL deallocSel = NSSelectorFromString(@"dealloc");/*@selector(dealloc)*/
Method dealloc = class_getInstanceMethod(class, deallocSel);
IMP origImpl = method_getImplementation(dealloc),
+ #if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_6_0 || __MAC_OS_X_VERSION_MAX_ALLOWED < __MAC_10_8
+ newImpl = imp_implementationWithBlock(^ (void *obj)
+ #else
newImpl = imp_implementationWithBlock((__bridge void *)^ (void *obj)
+ #endif
+
{
//NSLog(@"Auto-deregistering any helpers (%@) on object %@ of class %@", objc_getAssociatedObject((__bridge id)obj, &MAKVONotificationCenter_HelpersKey), obj, class);
@autoreleasepool

No commit comments for this range

Something went wrong with that request. Please try again.