@@ -34,16 +34,13 @@ #import "OFInitializationFailedException.h" #import "OFMalformedXMLException.h" #import "OFUnboundPrefixException.h" -#import "autorelease.h" -#import "macros.h" - -typedef void (*state_function)(id, SEL); +typedef void (*state_function_t)(id, SEL); static SEL selectors[OF_XMLPARSER_NUM_STATES]; -static state_function lookupTable[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) { @@ -168,11 +165,11 @@ for (i = 0; i < OF_XMLPARSER_NUM_STATES; i++) { if (![self instancesRespondToSelector: selectors[i]]) @throw [OFInitializationFailedException exceptionWithClass: self]; - lookupTable[i] = (state_function) + lookupTable[i] = (state_function_t) [self instanceMethodForSelector: selectors[i]]; } } + (instancetype)parser