Use OF_SETTER/OF_GETTER.

This commit is contained in:
Jonathan Schleifer 2012-01-04 23:25:59 +01:00
parent 2f7b349539
commit b94a321cfa

View file

@ -41,9 +41,14 @@
{ {
self = [super init]; self = [super init];
[self setAuthzid: authzid_]; @try {
[self setAuthcid: authcid_]; authzid = [authzid_ copy];
[self setPassword: password_]; authcid = [authcid_ copy];
password = [password_ copy];
} @catch (id e) {
[self release];
@throw e;
}
return self; return self;
} }
@ -59,38 +64,32 @@
- (void)setAuthzid: (OFString*)authzid_ - (void)setAuthzid: (OFString*)authzid_
{ {
OFString *old = authzid; OF_SETTER(authzid, authzid_, YES, YES)
authzid = [authzid_ copy];
[old release];
} }
- (OFString*)authzid - (OFString*)authzid
{ {
return [[authzid copy] autorelease]; OF_GETTER(authzid, YES)
} }
- (void)setAuthcid: (OFString*)authcid_ - (void)setAuthcid: (OFString*)authcid_
{ {
OFString *old = authcid; OF_SETTER(authcid, authcid_, YES, YES)
authcid = [authcid_ copy];
[old release];
} }
- (OFString*)authcid - (OFString*)authcid
{ {
return [[authcid copy] autorelease]; OF_GETTER(authcid, YES)
} }
- (void)setPassword: (OFString*)password_ - (void)setPassword: (OFString*)password_
{ {
OFString *old = password; OF_SETTER(password, password_, YES, YES)
password = [password_ copy];
[old release];
} }
- (OFString*)password - (OFString*)password
{ {
return [[password copy] autorelease]; OF_GETTER(password, YES)
} }
- (OFDataArray*)initialMessage - (OFDataArray*)initialMessage