I'm not sure, but from what I've read, I believe the non-underscore version is only for use in Obj-C declarations (methods, properties), where the double-underscore is for C declarations, including functions and variables (local, global, or, I would expect, instance).
I don't know why there would be an issue with multiple levels of pointers in a method declaration. Perhaps when everyone's recovered from WWDC, someone else will chime in to help out. :-) On 13 June 2015 at 18:00, Jonathan Schleifer <[email protected]> wrote: > Ah, thanks, that indeed works :). I was grepping `strings clang` for > objc_null, that explains why I didn't find anything. > > Also, since there's no real documentation yet, what's the difference > between __nullable and nullable and __nonnull and nonnull? What I found > online reads like it's basically the same, with the one without the __ > being only usable in a method declaration. However, I noticed that there > are cases where the one without __ doesn't work in a method declaration, > e.g. when you have two layers of pointers. > > -- > Jonathan > > > Am 13.06.2015 um 17:59 schrieb Michael Hackett < > [email protected]>: > > > > I believe it's: > > > > #if > > __has_feature(nullability) > > > > > > > > On 13 June 2015 at 11:54, Jonathan Schleifer <[email protected]> > wrote: > > Hi! > > > > I saw that there's a __has_feature() for objc_generics and objc_kindof, > however, there doesn't seem to be objc_nullability or similar. Since the > sources for the Clang from Xcode 7 haven't been released, I grepped through > `strings clang`, however, I could not find anything useful. > > > > What is the best way to check if the compiler supports nullability, so > that if not I can #define nonnull and friends to nothing? > > > > PS: I also found objc_generics_variance - what's that? > > > > -- > > Jonathan > > _______________________________________________ > > Do not post admin requests to the list. They will be ignored. > > Objc-language mailing list ([email protected]) > > Help/Unsubscribe/Update your Subscription: > > > https://lists.apple.com/mailman/options/objc-language/js-apple-objc%40webkeks.org > > > > This email sent to [email protected] > >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Objc-language mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/objc-language/archive%40mail-archive.com This email sent to [email protected]
