NSURLComponents fixes

- Moved NSURLComponents internal declaration to correct place.
- Added GS_DESTROY_INTERNAL() calls for NSURLComponents and NSURLQueryItem.
This commit is contained in:
Frederik Seiffert 2020-03-23 14:46:45 +01:00
parent 8e093a519e
commit 8774e5f55d

View file

@ -92,10 +92,6 @@ function may be incorrect
#import "GNUstepBase/NSURL+GNUstepBase.h"
#define GSInternal NSURLComponentsInternal
#include "GSInternal.h"
GS_PRIVATE_INTERNAL(NSURLComponents)
NSString * const NSURLErrorDomain = @"NSURLErrorDomain";
NSString * const NSErrorFailingURLStringKey = @"NSErrorFailingURLStringKey";
@ -2174,7 +2170,6 @@ static NSUInteger urlAlign;
@end
#undef GSInternal
#define GSInternal NSURLQueryItemInternal
#include "GSInternal.h"
GS_PRIVATE_INTERNAL(NSURLQueryItem)
@ -2209,6 +2204,7 @@ GS_PRIVATE_INTERNAL(NSURLQueryItem)
{
RELEASE(internal->_name);
RELEASE(internal->_value);
GS_DESTROY_INTERNAL(NSURLQueryItem);
[super dealloc];
}
@ -2263,6 +2259,13 @@ GS_PRIVATE_INTERNAL(NSURLQueryItem)
@end
#undef GSInternal
#define GSInternal NSURLComponentsInternal
#include "GSInternal.h"
GS_PRIVATE_INTERNAL(NSURLComponents)
@implementation NSURLComponents
// Creating URL components...
@ -2344,7 +2347,7 @@ GS_PRIVATE_INTERNAL(NSURLQueryItem)
RELEASE(internal->_percentEncodedQueryItems);
RELEASE(internal->_percentEncodedScheme);
RELEASE(internal->_percentEncodedUser);
GS_DESTROY_INTERNAL(NSURLComponents);
[super dealloc];
}