Change direct references to the isa pointer to calls to object_getClass(). In

discussion with Steve Naroff (before he left Apple) it was decided that the isa
pointer should be regarded as an implementation detail and not part of the
language, so direct references to it are deprecated (on OS X).  This gives the
runtime a bit more freedom to do secret isa-swizzling tricks.

I've had these changes sitting in my copy for ages - no idea why they weren't
committed.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33111 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-05-25 11:19:09 +00:00
parent 1964b0d902
commit 2ccfbde833
3 changed files with 7 additions and 7 deletions

View file

@ -572,7 +572,7 @@ typedef struct _PathElement
//
- (NSBezierPath *)bezierPathByFlatteningPath
{
NSBezierPath *path = [isa bezierPath];
NSBezierPath *path = [object_getClass(self) bezierPath];
NSBezierPathElement type;
NSPoint pts[3];
NSPoint coeff[4];
@ -631,7 +631,7 @@ typedef struct _PathElement
- (NSBezierPath *) bezierPathByReversingPath
{
NSBezierPath *path = [isa bezierPath];
NSBezierPath *path = [object_getClass(self) bezierPath];
NSBezierPathElement type, last_type;
NSPoint pts[3];
NSPoint p, cp1, cp2;
@ -2073,7 +2073,7 @@ static NSPoint point_on_curve(double t, NSPoint a, NSPoint b, NSPoint c,
PathElement elem;
int i, count;
if (![aPath isKindOfClass: isa])
if (![aPath isKindOfClass: object_getClass(self)])
{
[super appendBezierPath: aPath];
return;

View file

@ -85,7 +85,7 @@ globalFontMap.
-(BOOL) isEqual: (id)other
{
GSFontMapKey *o;
if (![other isKindOfClass: isa])
if (![other isKindOfClass: object_getClass(self)])
return NO;
o = other;
if (hash != o->hash || screenFont != o->screenFont || role != o->role
@ -925,7 +925,7 @@ static void setNSFont(NSString *key, NSFont *font)
{
if (anObject == self)
return YES;
if ([anObject isKindOfClass: self->isa] == NO)
if ([anObject isKindOfClass: object_getClass(self)] == NO)
return NO;
if ([[anObject fontName] isEqual: fontName] == NO)
return NO;

View file

@ -125,7 +125,7 @@
if (anObject == self)
return NSOrderedSame;
if (anObject == nil || ([anObject isKindOfClass: self->isa] == NO))
if (anObject == nil || ([anObject isKindOfClass: object_getClass(self)] == NO))
return NSOrderedAscending;
loc = ((NSTextTab*)anObject)->_location;
if (_location < loc)
@ -148,7 +148,7 @@
{
if (anObject == self)
return YES;
if ([anObject isKindOfClass: self->isa] == NO)
if ([anObject isKindOfClass: object_getClass(self)] == NO)
return NO;
else if (((NSTextTab*)anObject)->_tabStopType != _tabStopType)
return NO;