mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
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:
parent
60c38bae4e
commit
4a099cd60a
4 changed files with 1 additions and 34 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)) ? '+' : '-');
|
||||
|
|
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue