mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Fixed internal ivar usage for NSURLQueryItem.
This commit is contained in:
parent
3743e1d643
commit
a0779f4e62
1 changed files with 18 additions and 16 deletions
|
@ -2190,28 +2190,30 @@ static NSUInteger urlAlign;
|
|||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
ASSIGNCOPY(_name, name);
|
||||
ASSIGNCOPY(_value, value);
|
||||
GS_CREATE_INTERNAL(NSURLQueryItem);
|
||||
|
||||
ASSIGNCOPY(internal->_name, name);
|
||||
ASSIGNCOPY(internal->_value, value);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
RELEASE(_name);
|
||||
RELEASE(_value);
|
||||
RELEASE(internal->_name);
|
||||
RELEASE(internal->_value);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// Reading a name and value from a query
|
||||
- (NSString *) name
|
||||
{
|
||||
return _name;
|
||||
return internal->_name;
|
||||
}
|
||||
|
||||
- (NSString *) value
|
||||
{
|
||||
return _value;
|
||||
return internal->_value;
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder *)acoder
|
||||
|
@ -2220,13 +2222,13 @@ static NSUInteger urlAlign;
|
|||
{
|
||||
if ([acoder allowsKeyedCoding])
|
||||
{
|
||||
_name = [acoder decodeObjectForKey: @"NS.name"];
|
||||
_value = [acoder decodeObjectForKey: @"NS.value"];
|
||||
internal->_name = [acoder decodeObjectForKey: @"NS.name"];
|
||||
internal->_value = [acoder decodeObjectForKey: @"NS.value"];
|
||||
}
|
||||
else
|
||||
{
|
||||
_name = [acoder decodeObject];
|
||||
_value = [acoder decodeObject];
|
||||
internal->_name = [acoder decodeObject];
|
||||
internal->_value = [acoder decodeObject];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
|
@ -2236,20 +2238,20 @@ static NSUInteger urlAlign;
|
|||
{
|
||||
if ([acoder allowsKeyedCoding])
|
||||
{
|
||||
[acoder encodeObject: _name forKey: @"NS.name"];
|
||||
[acoder encodeObject: _value forKey: @"NS.value"];
|
||||
[acoder encodeObject: internal->_name forKey: @"NS.name"];
|
||||
[acoder encodeObject: internal->_value forKey: @"NS.value"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[acoder encodeObject: _name];
|
||||
[acoder encodeObject: _value];
|
||||
[acoder encodeObject: internal->_name];
|
||||
[acoder encodeObject: internal->_value];
|
||||
}
|
||||
}
|
||||
|
||||
- (id) copyWithZone: (NSZone *)zone
|
||||
{
|
||||
return [[[self class] allocWithZone: zone] initWithName: _name
|
||||
value: _value];
|
||||
return [[[self class] allocWithZone: zone] initWithName: internal->_name
|
||||
value: internal->_value];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue