-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make PLBlockIMP drop in compatible on iOS 4 and 5 #2
base: master
Are you sure you want to change the base?
Conversation
…em if available. Stole this code from PLWeakCompatibility after @landonf encouraged me to.
#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might be picking up the AvailabilityMacros.h header via the objc headers, but it would be nice to be explicit about including the header for these defines. Also, could these #if statements be somehow combined to avoid duplicating the typedefs?
As an alternative, the code could simply skip the duplicate declarations of the imp_* APIs if the SDK's _VERSION_MAX_ALLOWED is greater than 4.3 / 10.7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the typedefs are still necessary, because otherwise the signature of the implementation of imp_implementationWithBlock
and friends is mismatched on either iOS6+ or iOS<6.
Agreed on the rest, I don't know much (anything) about the preprocessor so I went the easy and verbose route.
Ok, just tested on our 4.2.1 device, works flawless. |
So, what's the plan, can this be merged? What do I have to provide in order for it to be merged? Thanks! |
Sorry, I'm slow, but it's not off my radar :) |
As discussed in IRC.
I haven't yet had the opportunity to test on an iOS < 4.3 device.