@@ -114,12 +114,12 @@ * * @param parser The parser which found an unknown entity * @param entity The name of the entity the XML parser didn't know * @return A substitution for the entity or `nil` */ -- (OFString *)parser: (OFXMLParser *)parser - foundUnknownEntityNamed: (OFString *)entity; +- (nullable OFString *)parser: (OFXMLParser *)parser + foundUnknownEntityNamed: (OFString *)entity; @end /*! * @class OFXMLParser OFXMLParser.h ObjFW/OFXMLParser.h * @@ -128,11 +128,11 @@ * OFXMLParser is an event-based XML parser which calls the delegate's callbacks * as soon as it finds something, thus suitable for streams as well. */ @interface OFXMLParser: OFObject { - id _delegate; + id _Nullable _delegate; enum of_xml_parser_state { OF_XMLPARSER_IN_BYTE_ORDER_MARK, OF_XMLPARSER_OUTSIDE_TAG, OF_XMLPARSER_TAG_OPENED, OF_XMLPARSER_IN_PROCESSING_INSTRUCTIONS, @@ -153,18 +153,18 @@ OF_XMLPARSER_IN_COMMENT_2, OF_XMLPARSER_IN_DOCTYPE, OF_XMLPARSER_NUM_STATES } _state; size_t _i, _last; - const char *_data; + const char *_Nullable _data; OFMutableData *_buffer; - OFString *_name, *_prefix; + OFString *_Nullable _name, *_Nullable _prefix; OFMutableArray OF_GENERIC(OFMutableDictionary OF_GENERIC(OFString *, OFString *) *) *_namespaces; OFMutableArray OF_GENERIC(OFXMLAttribute *) *_attributes; - OFString *_attributeName, *_attributePrefix; + OFString *_Nullable _attributeName, *_Nullable _attributePrefix; char _delimiter; OFMutableArray OF_GENERIC(OFString *) *_previous; size_t _level; bool _acceptProlog; size_t _lineNumber;