mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
[NSNumber -init] should not destroy itself when called as [super init]. This behaviour was breaking anything that subclassed NSNumber in user code (e.g. PyObjC).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33517 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
866c1dfcb4
commit
26b91d9bcd
1 changed files with 4 additions and 0 deletions
|
@ -763,6 +763,10 @@ if (aValue >= -1 && aValue <= 12)\
|
||||||
*/
|
*/
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
|
if (object_getClass(self) != NSNumberClass)
|
||||||
|
{
|
||||||
|
return [super init];
|
||||||
|
}
|
||||||
DESTROY(self);
|
DESTROY(self);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue