Differences From Artifact [75261e507a]:
- File
src/OFXMLParser.m
— part of check-in
[68d32a92c1]
at
2014-06-16 15:06:26
on branch trunk
— Make return type of -[OFArray objects] const
After all, this might (and does for OFArray_adjacent!) return an
internal representation that must not be changed, so changes should be
prevented at compile-time. (user: js, size: 24361) [annotate] [blame] [check-ins using]
To Artifact [006e6e5905]:
- File
src/OFXMLParser.m
— part of check-in
[13ee56edf3]
at
2014-06-21 21:43:43
on branch trunk
— Move all macros from OFObject.h to macros.h
This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. (user: js, size: 24323) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
32 33 34 35 36 37 38 | #endif #import "OFSystemInfo.h" #import "OFInitializationFailedException.h" #import "OFMalformedXMLException.h" #import "OFUnboundPrefixException.h" | < < < | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | #endif #import "OFSystemInfo.h" #import "OFInitializationFailedException.h" #import "OFMalformedXMLException.h" #import "OFUnboundPrefixException.h" typedef void (*state_function_t)(id, SEL); static SEL selectors[OF_XMLPARSER_NUM_STATES]; static state_function_t lookupTable[OF_XMLPARSER_NUM_STATES]; static OF_INLINE void appendToBuffer(OFDataArray *buffer, const char *string, of_string_encoding_t encoding, size_t length) { if (OF_LIKELY(encoding == OF_STRING_ENCODING_UTF_8)) [buffer addItems: string |
︙ | ︙ | |||
166 167 168 169 170 171 172 | memcpy(selectors, selectors_, sizeof(selectors_)); for (i = 0; i < OF_XMLPARSER_NUM_STATES; i++) { if (![self instancesRespondToSelector: selectors[i]]) @throw [OFInitializationFailedException exceptionWithClass: self]; | | | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | memcpy(selectors, selectors_, sizeof(selectors_)); for (i = 0; i < OF_XMLPARSER_NUM_STATES; i++) { if (![self instancesRespondToSelector: selectors[i]]) @throw [OFInitializationFailedException exceptionWithClass: self]; lookupTable[i] = (state_function_t) [self instanceMethodForSelector: selectors[i]]; } } + (instancetype)parser { return [[[self alloc] init] autorelease]; |
︙ | ︙ |