mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Tidied methods into correct categories
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12004 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bdbcf3af37
commit
525eeed589
1 changed files with 61 additions and 59 deletions
|
@ -58,6 +58,8 @@ static Class NSConstantStringClass;
|
|||
@class NSDataMalloc;
|
||||
@class NSMutableDataMalloc;
|
||||
|
||||
static BOOL deallocNotifications = NO;
|
||||
|
||||
|
||||
/*
|
||||
* Reference count and memory management
|
||||
|
@ -656,23 +658,6 @@ static BOOL double_release_check_enabled = NO;
|
|||
NSDeallocateObject (self);
|
||||
}
|
||||
|
||||
static BOOL deallocNotifications = NO;
|
||||
|
||||
- (BOOL) deallocNotificationsActive
|
||||
{
|
||||
return deallocNotifications;
|
||||
}
|
||||
|
||||
- (void) setDeallocNotificationsActive: (BOOL)flag
|
||||
{
|
||||
deallocNotifications = flag;
|
||||
}
|
||||
|
||||
- (BOOL) _dealloc
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (id) free
|
||||
{
|
||||
[NSException raise: NSGenericException
|
||||
|
@ -811,42 +796,6 @@ static BOOL deallocNotifications = NO;
|
|||
return [NSString stringWithCString: object_get_class_name(self)];
|
||||
}
|
||||
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
{
|
||||
return [self description];
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionWithLocale: (NSDictionary*)locale
|
||||
{
|
||||
return [self description];
|
||||
}
|
||||
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)locale indent: (unsigned)c
|
||||
{
|
||||
return [self descriptionWithLocale: locale];
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionWithLocale: (NSDictionary*)locale indent: (unsigned)c
|
||||
{
|
||||
return [self descriptionWithLocale: locale];
|
||||
}
|
||||
|
||||
- (void) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
indent: (unsigned)level
|
||||
to: (id<GNUDescriptionDestination>)output
|
||||
{
|
||||
[output appendString:
|
||||
[(id)self descriptionWithLocale: aLocale indent: level]];
|
||||
}
|
||||
|
||||
+ (void) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
indent: (unsigned)level
|
||||
to: (id<GNUDescriptionDestination>)output
|
||||
{
|
||||
[output appendString:
|
||||
[(id)self descriptionWithLocale: aLocale indent: level]];
|
||||
}
|
||||
|
||||
+ (void) poseAsClass: (Class)aClassObject
|
||||
{
|
||||
class_pose_as(self, aClassObject);
|
||||
|
@ -2228,7 +2177,7 @@ GSSetValue(NSObject *self, NSString *key, id val, SEL sel,
|
|||
|
||||
|
||||
|
||||
@implementation NSObject (GNUstep)
|
||||
@implementation NSObject (GNU)
|
||||
|
||||
/* GNU Object class compatibility */
|
||||
|
||||
|
@ -2248,24 +2197,24 @@ GSSetValue(NSObject *self, NSString *key, id val, SEL sel,
|
|||
double_release_check_enabled = enable;
|
||||
}
|
||||
|
||||
- (int) compare: (id)anotherObject
|
||||
- (int) compare: (id)anObject
|
||||
{
|
||||
if (anotherObject == self)
|
||||
if (anObject == self)
|
||||
{
|
||||
return NSOrderedSame;
|
||||
}
|
||||
if (anotherObject == nil)
|
||||
if (anObject == nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"nil argument for compare:"];
|
||||
}
|
||||
if ([self isEqual: anotherObject])
|
||||
if ([self isEqual: anObject])
|
||||
{
|
||||
return NSOrderedSame;
|
||||
}
|
||||
// Ordering objects by their address is pretty useless,
|
||||
// so subclasses should override this is some useful way.
|
||||
if (self > anotherObject)
|
||||
if (self > anObject)
|
||||
{
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
|
@ -2275,6 +2224,59 @@ GSSetValue(NSObject *self, NSString *key, id val, SEL sel,
|
|||
}
|
||||
}
|
||||
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
{
|
||||
return [self description];
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
{
|
||||
return [self description];
|
||||
}
|
||||
|
||||
- (NSString*) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
indent: (unsigned)level
|
||||
{
|
||||
return [self descriptionWithLocale: aLocale];
|
||||
}
|
||||
|
||||
+ (NSString*) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
indent: (unsigned)level
|
||||
{
|
||||
return [self descriptionWithLocale: aLocale];
|
||||
}
|
||||
|
||||
- (void) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
indent: (unsigned)level
|
||||
to: (id<GNUDescriptionDestination>)output
|
||||
{
|
||||
[output appendString:
|
||||
[(id)self descriptionWithLocale: aLocale indent: level]];
|
||||
}
|
||||
|
||||
+ (void) descriptionWithLocale: (NSDictionary*)aLocale
|
||||
indent: (unsigned)level
|
||||
to: (id<GNUDescriptionDestination>)output
|
||||
{
|
||||
[output appendString:
|
||||
[(id)self descriptionWithLocale: aLocale indent: level]];
|
||||
}
|
||||
|
||||
- (BOOL) deallocNotificationsActive
|
||||
{
|
||||
return deallocNotifications;
|
||||
}
|
||||
|
||||
- (void) setDeallocNotificationsActive: (BOOL)flag
|
||||
{
|
||||
deallocNotifications = flag;
|
||||
}
|
||||
|
||||
- (BOOL) _dealloc
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL) isMetaClass
|
||||
{
|
||||
return NO;
|
||||
|
|
Loading…
Reference in a new issue