diff --git a/properties.h b/properties.h index 4f13a02..a9ac581 100644 --- a/properties.h +++ b/properties.h @@ -40,6 +40,50 @@ enum PropertyAttributeKind OBJC_PR_setter = (1<<7) }; +/** + * Flags in the second attributes field in declared properties. + * Note: This field replaces the old 'is synthesized' field and so these values + * are shifted left one from their values in clang. + */ +enum PropertyAttributeKind2 +{ + /** + * No extended attributes. + */ + OBJC_PR_noextattr = 0, + /** + * The property is synthesized. This has no meaning in properties on + * protocols. + */ + OBJC_PR_synthesized = (1<<0), + /** + * The property is dynamic (i.e. the implementation is inherited or + * provided at run time). + */ + OBJC_PR_dynamic = (1<<1), + /** + * This property belongs to a protocol. + */ + OBJC_PR_protocol = OBJC_PR_synthesized | OBJC_PR_dynamic, + /** + * The property is atomic. + */ + OBJC_PR_atomic = (1<<2), + /** + * The property value is a zeroing weak reference. + */ + OBJC_PR_weak = (1<<3), + /** + * The property value is strong (retained). Currently, this is equivalent + * to the strong attribute. + */ + OBJC_PR_strong = (1<<4), + /** + * The property value is just copied. + */ + OBJC_PR_unsafe_unretained = (1<<5), +}; + /** * Structure used for property enumeration. Note that property enumeration is * currently quite broken on OS X, so achieving full compatibility there is @@ -60,7 +104,17 @@ struct objc_property /** * Flag set if the property is synthesized. */ - const char isSynthesized; + char attributes2; + /** + * Padding field. These were implicit in the structure field alignment + * (four more on 64-bit platforms), but we'll make them explicit now for + * future use. + */ + char unused1; + /** + * More padding. + */ + char unused2; /** * Name of the getter for this property. */