@@ -14,10 +14,12 @@ * file. */ #import "OFObject.h" +OF_ASSUME_NONNULL_BEGIN + @class OFString; #ifndef DOXYGEN @class OFArray OF_GENERIC(ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); #endif @@ -48,11 +50,11 @@ } #ifdef OF_HAVE_PROPERTIES @property (readonly) SEL selector; @property (readonly, copy) OFString *name; -@property (readonly) const char *typeEncoding; +@property (assign, readonly, nullable) const char *typeEncoding; #endif /*! * @brief Returns the selector of the method. * @@ -70,11 +72,11 @@ /*! * @brief Returns the type encoding for the method. * * @return The type encoding for the method */ -- (const char*)typeEncoding; +- (nullable const char*)typeEncoding; @end /*! * @class OFProperty OFIntrospection.h ObjFW/OFIntrospection.h * @@ -88,11 +90,11 @@ } #ifdef OF_HAVE_PROPERTIES @property (readonly, copy) OFString *name; @property (readonly) unsigned attributes; -@property (readonly, copy) OFString *getter, *setter; +@property (copy, readonly, nullable) OFString *getter, *setter; #endif /*! * @brief Returns the name of the property. * @@ -124,18 +126,18 @@ /*! * @brief Returns the name of the getter. * * @return The name of the getter */ -- (OFString*)getter; +- (nullable OFString*)getter; /*! * @brief Returns the name of the setter. * * @return The name of the setter */ -- (OFString*)setter; +- (nullable OFString*)setter; @end /*! * @class OFInstanceVariable OFIntrospection.h ObjFW/OFIntrospection.h * @@ -149,11 +151,11 @@ } #ifdef OF_HAVE_PROPERTIES @property (readonly, copy) OFString *name; @property (readonly) ptrdiff_t offset; -@property (readonly) const char *typeEncoding; +@property (assign, readonly, nullable) const char *typeEncoding; #endif /*! * @brief Returns the name of the instance variable. * @@ -171,11 +173,11 @@ /*! * @brief Returns the type encoding for the instance variable. * * @return The type encoding for the instance variable */ -- (const char*)typeEncoding; +- (nullable const char*)typeEncoding; @end /*! * @class OFIntrospection OFIntrospection.h ObjFW/OFIntrospection.h * @@ -257,5 +259,7 @@ */ - (OFArray OF_GENERIC(OFInstanceVariable*)*)instanceVariables; /* TODO: protocols */ @end + +OF_ASSUME_NONNULL_END