[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFA/base](HEAD) remove -[NSObject compare:]
From: |
David Ayers |
Subject: |
[RFA/base](HEAD) remove -[NSObject compare:] |
Date: |
Wed, 10 Sep 2003 16:00:43 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507 |
Hello everyone,
I think we can now safely remove NSObject's compare
declaration/implementation from -base. GDL2 has been updated and I've
check GSWeb and other projects in dev-libs that they send compare: to
typed recivers of valid types.
I'm not sure what we should do on the branch. We don't have a real
deprecation mechanism in place. We could simply remove the declaration,
but then the IMP signature would be assumed for projects ignoring
warnings :-/. Would a comment in the header suffice?
OK to commit?
* Headers/Foundation/NSObject.h
* Headers/Additions/GNUstepBase/GSCategories.h
* Source/Additions/GSCategories.m
(-[NSObject compare:]): Remove.
Cheers,
David
Index: Headers/Additions/GNUstepBase/GSCategories.h
===================================================================
RCS file:
/cvsroot/gnustep/gnustep/core/base/Headers/Additions/GNUstepBase/GSCategories.h,v
retrieving revision 1.1
diff -u -r1.1 GSCategories.h
--- Headers/Additions/GNUstepBase/GSCategories.h 31 Jul 2003 23:49:29
-0000 1.1
+++ Headers/Additions/GNUstepBase/GSCategories.h 10 Sep 2003 13:44:50
-0000
@@ -76,7 +76,6 @@
- notImplemented:(SEL)aSel;
- (id) subclassResponsibility: (SEL)aSel;
- (id) shouldNotImplement: (SEL)aSel;
-- (NSComparisonResult) compare: (id)anObject;
@end
Index: Headers/Foundation/NSObject.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/base/Headers/Foundation/NSObject.h,v
retrieving revision 1.1
diff -u -r1.1 NSObject.h
--- Headers/Foundation/NSObject.h 31 Jul 2003 23:49:29 -0000 1.1
+++ Headers/Foundation/NSObject.h 10 Sep 2003 13:44:50 -0000
@@ -295,7 +295,6 @@
- notImplemented:(SEL)aSel;
- (id) subclassResponsibility: (SEL)aSel;
- (id) shouldNotImplement: (SEL)aSel;
-- (NSComparisonResult) compare: (id)anObject;
@end
#endif
Index: Source/Additions/GSCategories.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/base/Source/Additions/GSCategories.m,v
retrieving revision 1.13
diff -u -r1.13 GSCategories.m
--- Source/Additions/GSCategories.m 24 Aug 2003 23:07:41 -0000 1.13
+++ Source/Additions/GSCategories.m 10 Sep 2003 13:44:50 -0000
@@ -569,39 +569,6 @@
return nil;
}
-/**
- * Compare the receiver with anObject to see which is greater.
- * The default implementation orders by memory location.
- */
-- (int) compare: (id)anObject
-{
- if (anObject == self)
- {
- return NSOrderedSame;
- }
- if (anObject == nil)
- {
- [NSException raise: NSInvalidArgumentException
- format: @"nil argument for compare:"];
- }
- 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 > anObject)
- {
- return NSOrderedDescending;
- }
- else
- {
- return NSOrderedAscending;
- }
-}
-
@end
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [RFA/base](HEAD) remove -[NSObject compare:],
David Ayers <=