Partially revert poorly thoght out code

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32127 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-02-13 06:43:22 +00:00
parent 60c38bae4e
commit 4a099cd60a
4 changed files with 1 additions and 34 deletions

View file

@ -1,12 +1,7 @@
2011-02-13 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Additions/GNUstepBase/NSObject+GNUstepBase.h:
* Source/Additions/NSObject+GNUstepBase.m:
Add -notImplemented:reason: to raise an exception when someone used
a class/method which depends on another library not present at
configure time.
* Source/NSCalendar.m:
Raise exception if used when not implmented because of no UCU
Use more runtime functions directly. Standardise exception formats.
* Source/ObjectiveC2/runtime.c: Fix some cases of dereferencing null
pointers.

View file

@ -76,13 +76,6 @@ extern "C" {
*/
- (id) notImplemented: (SEL)aSel GS_NORETURN_METHOD;
/**
* Message sent when an implementation wants to explicitly exclude a method
* (but cannot due to compiler constraint), and wants to make sure it is not
* called by mistake. Default implementation raises an exception at runtime.
*/
- (id) notImplemented: (SEL)aSel reason: (NSString*)reason GS_NORETURN_METHOD;
/**
* Message sent when an implementation wants to explicitly require a subclass
* to implement a method (but cannot at compile time since there is no

View file

@ -100,19 +100,6 @@
return nil;
}
- (id) notImplemented: (SEL)aSel reason: (NSString*)reason
{
char c = (class_isMetaClass(object_getClass(self)) ? '+' : '-');
[NSException
raise: NSGenericException
format: @"[%@%c%@] not implemented ... %@",
NSStringFromClass([self class]), c,
aSel ? (id)NSStringFromSelector(aSel) : (id)@"(null)",
reason];
return nil;
}
- (id) shouldNotImplement: (SEL)aSel
{
char c = (class_isMetaClass(object_getClass(self)) ? '+' : '-');

View file

@ -155,14 +155,6 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
static NSCalendar *autoupdatingCalendar = nil;
static NSRecursiveLock *classLock = nil;
#if GS_USE_ICU == 0
+ (id) allocWithZone: (NSZone*)z
{
[self notImplemented: _cmd
reason: @"missing ICU support at configure time."];
}
#endif
+ (void) initialize
{
if (self == [NSLocale class])