mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +00:00
tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36517 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a12773409b
commit
d134057c06
5 changed files with 21 additions and 33 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2013-04-13 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Headers/GNUstepBase/GNUstep.h: NSInteger/NSUInteger cleanup.
|
||||||
|
* Source/NSAffineTransform.m: Fix -isEqual: for subclassing.
|
||||||
|
* Source/NSObject.m: Remove previously deprecarted function
|
||||||
|
* Source/NSProxy.m: Avoid compiler warning
|
||||||
|
* Source/NSDistantObject.m: Avoid compiler warning
|
||||||
|
|
||||||
2013-04-12 Richard Frith-Macdonald <rfm@gnu.org>
|
2013-04-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSPortCoder.m:
|
* Source/NSPortCoder.m:
|
||||||
|
|
|
@ -578,13 +578,18 @@ static NSAffineTransformStruct identityTransform = {
|
||||||
|
|
||||||
- (BOOL) isEqual: (id)anObject
|
- (BOOL) isEqual: (id)anObject
|
||||||
{
|
{
|
||||||
if ([anObject class] == isa)
|
if (anObject == self)
|
||||||
{
|
{
|
||||||
NSAffineTransform *o = anObject;
|
return YES;
|
||||||
|
}
|
||||||
|
if (YES == [anObject isKindOfClass: [NSAffineTransform class]])
|
||||||
|
{
|
||||||
|
NSAffineTransformStruct o = [anObject transformStruct];
|
||||||
|
|
||||||
if (A == o->A && B == o->B && C == o->C
|
if (0 == memcmp((void*)&o, (void*)&_matrix, sizeof(o)))
|
||||||
&& D == o->D && TX == o->TX && TY == o->TY)
|
{
|
||||||
return YES;
|
return YES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
|
@ -908,7 +908,7 @@ GS_ROOT_CLASS @interface GSDistantObjectPlaceHolder
|
||||||
|
|
||||||
- (Class) classForPortCoder
|
- (Class) classForPortCoder
|
||||||
{
|
{
|
||||||
return isa;
|
return object_getClass(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) replacementObjectForPortCoder: (NSPortCoder*)aRmc;
|
- (id) replacementObjectForPortCoder: (NSPortCoder*)aRmc;
|
||||||
|
|
|
@ -666,15 +666,6 @@ callCXXConstructors(Class aClass, id anObject)
|
||||||
*/
|
*/
|
||||||
#if GS_WITH_GC
|
#if GS_WITH_GC
|
||||||
|
|
||||||
inline NSZone *
|
|
||||||
GSObjCZone(NSObject *object)
|
|
||||||
{
|
|
||||||
GSOnceFLog(@"GSObjCZone() is deprecated ... use -zone instead");
|
|
||||||
/* MacOS-X 10.5 seems to return the default malloc zone if GC is enabled.
|
|
||||||
*/
|
|
||||||
return NSDefaultMallocZone();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GSFinalize(void* object, void* data)
|
GSFinalize(void* object, void* data)
|
||||||
{
|
{
|
||||||
|
@ -763,23 +754,7 @@ NSDeallocateObject(id anObject)
|
||||||
|
|
||||||
#else /* GS_WITH_GC */
|
#else /* GS_WITH_GC */
|
||||||
|
|
||||||
#if !__OBJC_GC__
|
|
||||||
inline NSZone *
|
|
||||||
GSObjCZone(NSObject *object)
|
|
||||||
{
|
|
||||||
GSOnceFLog(@"GSObjCZone() is deprecated ... use -zone instead");
|
|
||||||
if (object_getClass(object) == NSConstantStringClass)
|
|
||||||
return NSDefaultMallocZone();
|
|
||||||
return NSZoneFromPointer(object);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __OBJC_GC__
|
#if __OBJC_GC__
|
||||||
inline NSZone *
|
|
||||||
GSObjCZone(NSObject *object)
|
|
||||||
{
|
|
||||||
return NSDefaultMallocZone();
|
|
||||||
}
|
|
||||||
static inline id
|
static inline id
|
||||||
GSAllocateObject (Class aClass, NSUInteger extraBytes, NSZone *zone);
|
GSAllocateObject (Class aClass, NSUInteger extraBytes, NSZone *zone);
|
||||||
|
|
||||||
|
@ -1417,7 +1392,7 @@ static id gs_weak_load(id obj)
|
||||||
#ifdef OBJC_SMALL_OBJECT_MASK
|
#ifdef OBJC_SMALL_OBJECT_MASK
|
||||||
if (((NSUInteger)self & OBJC_SMALL_OBJECT_MASK) == 0)
|
if (((NSUInteger)self & OBJC_SMALL_OBJECT_MASK) == 0)
|
||||||
#endif
|
#endif
|
||||||
destructorClass = isa;
|
destructorClass = object_getClass(self);
|
||||||
|
|
||||||
/* C++ destructors must be called in the opposite order to their
|
/* C++ destructors must be called in the opposite order to their
|
||||||
* creators, so start at the leaf class and then go up the tree until we
|
* creators, so start at the leaf class and then go up the tree until we
|
||||||
|
|
|
@ -550,7 +550,7 @@
|
||||||
*/
|
*/
|
||||||
- (Class) superclass
|
- (Class) superclass
|
||||||
{
|
{
|
||||||
return class_getSuperclass(isa);
|
return class_getSuperclass(object_getClass(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue