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
Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass() #106
Comments
I researched this. Seems isa holds the class for the object. The warnings can be eliminated by replacing the offending lines with: object_setClass(dictionary, _JKDictionaryClass); // Dictionary case Haven't tested this yet, but I did verify that the changes eliminate the warnings in Xcode 4.6 DP2. |
A fix is to probably to use something like this: |
how is silencing warnings 'ever' a fix... that setClass call looks cool. |
It's how johnezang did it. |
where? its not in the trunk. |
I have the object_setClass fix in production. I haven't measured the performance impact, but saw the notes below in the comments of JSONKit.m, which makes me believe that the change will hurt performance. For my application it's good enough. // Why not just use |
+1 for the above pull .. |
+1 for pull req #121 |
Can please someone explain me if i could still use JSONKit after Xcode auto-fix? dictionary->isa = _JKDictionaryClass -------> object_setClass(dictionary, _JKDictionaryClass); |
Should do. I've not seen any breakages after applying the fix. |
JSONKit.m:680:12: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
JSONKit.m:931:17: Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()
XCODE 4.6DP2
The text was updated successfully, but these errors were encountered: