Index: src/XMPPCallback.m ================================================================== --- src/XMPPCallback.m +++ src/XMPPCallback.m @@ -53,17 +53,17 @@ { return [[[self alloc] initWithTarget: target selector: selector] autorelease]; } -- initWithTarget: (id)target_ - selector: (SEL)selector_ +- initWithTarget: (id)target + selector: (SEL)selector { self = [super init]; - _target = [target_ retain]; - _selector = selector_; + _target = [target retain]; + _selector = selector; return self; } - (void)dealloc Index: src/XMPPConnection.m ================================================================== --- src/XMPPConnection.m +++ src/XMPPConnection.m @@ -58,27 +58,27 @@ #define BUFFER_LENGTH 512 @interface XMPPConnection_ConnectThread: OFThread { - OFThread *sourceThread; - XMPPConnection *connection; + OFThread *_sourceThread; + XMPPConnection *_connection; } - initWithSourceThread: (OFThread*)sourceThread connection: (XMPPConnection*)connection; @end @implementation XMPPConnection_ConnectThread -- initWithSourceThread: (OFThread*)sourceThread_ - connection: (XMPPConnection*)connection_ +- initWithSourceThread: (OFThread*)sourceThread + connection: (XMPPConnection*)connection { self = [super init]; @try { - sourceThread = [sourceThread_ retain]; - connection = [connection_ retain]; + _sourceThread = [sourceThread retain]; + _connection = [connection retain]; } @catch (id e) { [self release]; @throw e; } @@ -85,31 +85,31 @@ return self; } - (void)dealloc { - [sourceThread release]; - [connection release]; + [_sourceThread release]; + [_connection release]; [super dealloc]; } - (void)didConnect { [self join]; - [connection handleConnection]; + [_connection handleConnection]; } - (id)main { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; - [connection connect]; + [_connection connect]; [self performSelector: @selector(didConnect) - onThread: sourceThread + onThread: _sourceThread waitUntilDone: false]; [pool release]; return nil; @@ -235,25 +235,25 @@ - (OFString*)server { return [[_server copy] autorelease]; } -- (void)setDomain: (OFString*)domain_ +- (void)setDomain: (OFString*)domain { OFString *oldDomain = _domain; OFString *oldDomainToASCII = _domainToASCII; - if (domain_ != nil) { + if (domain != nil) { char *srv; Stringprep_rc rc; - if ((rc = stringprep_profile([domain_ UTF8String], &srv, + if ((rc = stringprep_profile([domain UTF8String], &srv, "Nameprep", 0)) != STRINGPREP_OK) @throw [XMPPStringPrepFailedException exceptionWithConnection: self profile: @"Nameprep" - string: domain_]; + string: domain]; @try { _domain = [[OFString alloc] initWithUTF8String: srv]; } @finally { free(srv); @@ -1199,22 +1199,22 @@ [_delegates broadcastSelector: @selector(connection:wasBoundToJID:) withObject: self withObject: _JID]; } -- (OFString*)XMPP_IDNAToASCII: (OFString*)domain_ +- (OFString*)XMPP_IDNAToASCII: (OFString*)domain { OFString *ret; char *cDomain; Idna_rc rc; - if ((rc = idna_to_ascii_8z([domain_ UTF8String], + if ((rc = idna_to_ascii_8z([domain UTF8String], &cDomain, IDNA_USE_STD3_ASCII_RULES)) != IDNA_SUCCESS) @throw [XMPPIDNATranslationFailedException exceptionWithConnection: self operation: @"ToASCII" - string: domain_]; + string: domain]; @try { ret = [[OFString alloc] initWithUTF8String: cDomain]; } @finally { free(cDomain); Index: src/XMPPContactManager.m ================================================================== --- src/XMPPContactManager.m +++ src/XMPPContactManager.m @@ -26,19 +26,19 @@ #import "XMPPMulticastDelegate.h" #import "XMPPPresence.h" #import "XMPPRosterItem.h" @implementation XMPPContactManager -- initWithConnection: (XMPPConnection*)connection_ - roster: (XMPPRoster*)roster_ +- initWithConnection: (XMPPConnection*)connection + roster: (XMPPRoster*)roster { self = [super init]; @try { - _connection = connection_; + _connection = connection; [_connection addDelegate: self]; - _roster = roster_; + _roster = roster; [_roster addDelegate: self]; _contacts = [[OFMutableDictionary alloc] init]; _delegates = [[XMPPMulticastDelegate alloc] init]; } @catch (id e) { [self release]; @@ -87,11 +87,11 @@ - (OFDictionary*)contacts { OF_GETTER(_contacts, true) } -- (void)rosterWasReceived: (XMPPRoster*)roster_ +- (void)rosterWasReceived: (XMPPRoster*)roster { OFEnumerator *contactEnumerator; XMPPContact *contact; OFDictionary *rosterItems; OFEnumerator *rosterItemEnumerator; @@ -105,14 +105,14 @@ withObject: contact]; } [_contacts release]; _contacts = [[OFMutableDictionary alloc] init]; - rosterItems = [roster_ rosterItems]; + rosterItems = [roster rosterItems]; rosterItemEnumerator = [rosterItems keyEnumerator]; while ((bareJID = [rosterItemEnumerator nextObject]) != nil) { - contact = [[XMPPContact new] autorelease]; + contact = [[[XMPPContact alloc] init] autorelease]; [contact XMPP_setRosterItem: [rosterItems objectForKey: bareJID]]; [_contacts setObject: contact forKey: bareJID]; [_delegates broadcastSelector: @selector(contactManager: @@ -139,11 +139,11 @@ [_contacts removeObjectForKey: bareJID]; return; } if (contact == nil) { - contact = [[XMPPContact new] autorelease]; + contact = [[[XMPPContact alloc] init] autorelease]; [contact XMPP_setRosterItem: rosterItem]; [_contacts setObject: contact forKey: bareJID]; [_delegates broadcastSelector: @selector(contactManager: didAddContact:) Index: src/XMPPDiscoEntity.m ================================================================== --- src/XMPPDiscoEntity.m +++ src/XMPPDiscoEntity.m @@ -49,11 +49,11 @@ { self = [super initWithJID: [connection JID] node: nil]; @try { - _discoNodes = [OFMutableDictionary new]; + _discoNodes = [[OFMutableDictionary alloc] init]; _connection = connection; _capsNode = [capsNode copy]; [_connection addDelegate: self]; } @catch (id e) { Index: src/XMPPDiscoNode.m ================================================================== --- src/XMPPDiscoNode.m +++ src/XMPPDiscoNode.m @@ -59,20 +59,20 @@ name: (OFString*)name { self = [super init]; @try { - if ((JID == nil) && + if (JID == nil && ![self isKindOfClass: [XMPPDiscoEntity class]]) @throw [OFInvalidArgumentException exception]; _JID = [JID copy]; _node = [node copy]; _name = [name copy]; - _identities = [OFSortedList new]; - _features = [OFSortedList new]; - _childNodes = [OFMutableDictionary new]; + _identities = [[OFSortedList alloc] init]; + _features = [[OFSortedList alloc] init]; + _childNodes = [[OFMutableDictionary alloc] init]; [self addFeature: XMPP_NS_DISCO_ITEMS]; [self addFeature: XMPP_NS_DISCO_INFO]; } @catch (id e) { [self release]; Index: src/XMPPFileStorage.m ================================================================== --- src/XMPPFileStorage.m +++ src/XMPPFileStorage.m @@ -53,18 +53,18 @@ - initWithFile: (OFString*)file { self = [super init]; @try { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; _file = [file copy]; @try { _data = [[[OFDataArray dataArrayWithContentsOfFile: file] messagePackValue] retain]; } @catch (id e) { - _data = [OFMutableDictionary new]; + _data = [[OFMutableDictionary alloc] init]; } [pool release]; } @catch (id e) { [self release]; @@ -132,21 +132,21 @@ } - (void)setStringValue: (OFString*)string forPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self XMPP_setObject: string forPath: path]; [pool release]; } - (OFString*)stringValueForPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFString *string; string = [self XMPP_objectForPath: path]; [pool release]; @@ -155,21 +155,21 @@ } - (void)setBooleanValue: (bool)boolean forPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self XMPP_setObject: [OFNumber numberWithBool: boolean] forPath: path]; [pool release]; } - (bool)booleanValueForPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; bool boolean; boolean = [[self XMPP_objectForPath: path] boolValue]; [pool release]; @@ -178,21 +178,21 @@ } - (void)setIntegerValue: (intmax_t)integer forPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self XMPP_setObject: [OFNumber numberWithIntMax: integer] forPath: path]; [pool release]; } - (intmax_t)integerValueForPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; intmax_t integer; integer = [[self XMPP_objectForPath: path] intMaxValue]; [pool release]; @@ -201,21 +201,21 @@ } - (void)setArray: (OFArray*)array forPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self XMPP_setObject: array forPath: path]; [pool release]; } - (OFArray*)arrayForPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFArray *array; array = [self XMPP_objectForPath: path]; [pool release]; @@ -224,25 +224,25 @@ } - (void)setDictionary: (OFDictionary*)dictionary forPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; [self XMPP_setObject: dictionary forPath: path]; [pool release]; } - (OFDictionary*)dictionaryForPath: (OFString*)path { - OFAutoreleasePool *pool = [OFAutoreleasePool new]; + OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFDictionary *dictionary; dictionary = [self XMPP_objectForPath: path]; [pool release]; return dictionary; } @end Index: src/XMPPIQ.m ================================================================== --- src/XMPPIQ.m +++ src/XMPPIQ.m @@ -62,11 +62,11 @@ [ret setTo: [self from]]; [ret setFrom: nil]; return ret; } -- (XMPPIQ*)errorIQWithType: (OFString*)type_ +- (XMPPIQ*)errorIQWithType: (OFString*)type condition: (OFString*)condition text: (OFString*)text { XMPPIQ *ret = [XMPPIQ IQWithType: @"error" ID: [self ID]]; @@ -73,11 +73,11 @@ OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFXMLElement *error = [OFXMLElement elementWithName: @"error" namespace: XMPP_NS_CLIENT]; [error addAttributeWithName: @"type" - stringValue: type_]; + stringValue: type]; [error addChild: [OFXMLElement elementWithName: condition namespace: XMPP_NS_STANZAS]]; if (text) [error addChild: [OFXMLElement elementWithName: @"text" namespace: XMPP_NS_STANZAS @@ -89,13 +89,13 @@ [pool release]; return ret; } -- (XMPPIQ*)errorIQWithType: (OFString*)type_ +- (XMPPIQ*)errorIQWithType: (OFString*)type condition: (OFString*)condition { - return [self errorIQWithType: type_ + return [self errorIQWithType: type condition: condition text: nil]; } @end Index: src/XMPPRoster.m ================================================================== --- src/XMPPRoster.m +++ src/XMPPRoster.m @@ -38,17 +38,17 @@ #import "XMPPJID.h" #import "XMPPMulticastDelegate.h" #import "namespaces.h" @implementation XMPPRoster -- initWithConnection: (XMPPConnection*)connection_ +- initWithConnection: (XMPPConnection*)connection { self = [super init]; @try { _rosterItems = [[OFMutableDictionary alloc] init]; - _connection = connection_; + _connection = connection; [_connection addDelegate: self]; _delegates = [[XMPPMulticastDelegate alloc] init]; _dataStorage = [_connection dataStorage]; } @catch (id e) { [self release]; @@ -353,11 +353,11 @@ if (![[element name] isEqual: @"item"] || ![[element namespace] isEqual: XMPP_NS_ROSTER]) continue; - pool = [OFAutoreleasePool new]; + pool = [[OFAutoreleasePool alloc] init]; rosterItem = [self XMPP_rosterItemWithXMLElement: element]; [self XMPP_updateRosterItem: rosterItem]; [pool release]; } Index: src/XMPPSCRAMAuth.h ================================================================== --- src/XMPPSCRAMAuth.h +++ src/XMPPSCRAMAuth.h @@ -112,12 +112,12 @@ /// \cond internal - (OFString*)XMPP_genNonce; - (uint8_t*)XMPP_HMACWithKey: (OFDataArray*)key data: (OFDataArray*)data; -- (OFDataArray*)XMPP_hiWithData: (OFDataArray *)str - salt: (OFDataArray *)salt_ +- (OFDataArray*)XMPP_hiWithData: (OFDataArray*)str + salt: (OFDataArray*)salt iterationCount: (intmax_t)i; - (OFDataArray*)XMPP_parseServerFirstMessage: (OFDataArray*)data; - (OFDataArray*)XMPP_parseServerFinalMessage: (OFDataArray*)data; /// \endcond @end Index: src/XMPPSCRAMAuth.m ================================================================== --- src/XMPPSCRAMAuth.m +++ src/XMPPSCRAMAuth.m @@ -472,12 +472,12 @@ [pool release]; return [[hashO autorelease] digest]; } -- (OFDataArray*)XMPP_hiWithData: (OFDataArray *)str - salt: (OFDataArray *)salt_ +- (OFDataArray*)XMPP_hiWithData: (OFDataArray*)str + salt: (OFDataArray*)salt iterationCount: (intmax_t)i { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; size_t digestSize = [_hashType digestSize]; uint8_t *result = NULL, *u, *uOld; @@ -487,11 +487,11 @@ result = [self allocMemoryWithSize: digestSize]; @try { memset(result, 0, digestSize); - salty = [[salt_ copy] autorelease]; + salty = [[salt copy] autorelease]; [salty addItems: "\0\0\0\1" count: 4]; uOld = [self XMPP_HMACWithKey: str data: salty]; @@ -498,11 +498,11 @@ for (j = 0; j < digestSize; j++) result[j] ^= uOld[j]; for (j = 0; j < i - 1; j++) { - tmp = [OFDataArray new]; + tmp = [[OFDataArray alloc] init]; [tmp addItems: uOld count: digestSize]; [pool releaseObjects]; // releases uOld and previous tmp [tmp autorelease];