bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDL2 - patches for OSX (2)


From: Stéphane Corthésy
Subject: GDL2 - patches for OSX (2)
Date: Tue, 25 Mar 2003 23:00:42 +0100

Hi again,

Here's a second set of patches (note that I have a copyright assignment now for gnustep). About the previous set of patches: I didn't update GNUMakefile, as I don't use it...

Stéphane

Changelog:
EOControl/EODebug.h: use EOCONTROL_EXPORT instead of extern for function declarations EOControl/EOGlobalID.h: use EOCONTROL_EXPORT instead of extern for symbol declarations EOControl/EONSAddOns.m: use volatile in some exception handlers (man longjmp for more info) EOControl/EONull.h: use EOCONTROL_EXPORT instead of extern for function declarations EOControl/EOObjectStore.h: use EOCONTROL_EXPORT instead of extern for function/symbol declarations EOControl/EOOrQualifier.m: replaced autorelease by AUTORELEASE; avoids unnecessary autoreleased object EOControl/EOQualifier.m: provided implementation for -[NSArray filteredArrayUsingQualifier:] EOControl/EOSortOrdering.m: implemented <NSCopying> and provided implementation to -encodeWithKeyValueArchiver:


Index: EODebug.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EODebug.h,v
retrieving revision 1.3
diff -r1.3 EODebug.h
32a33,34
> #import <EOControl/EODefines.h>
>
37,39c39,41
< extern void EOFLogC_(const char* file,int line,const char* string);
< extern void EOFLogDumpObject_(const char* file,int line,id object,int deep); < extern void EOFLogAssertGood_(const char* file,int line,NSObject* object);
---
> EOCONTROL_EXPORT void EOFLogC_(const char* file,int line,const char* string); > EOCONTROL_EXPORT void EOFLogDumpObject_(const char* file,int line,id object,int deep); > EOCONTROL_EXPORT void EOFLogAssertGood_(const char* file,int line,NSObject* object);


Index: EOGlobalID.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOGlobalID.h,v
retrieving revision 1.2
diff -r1.2 EOGlobalID.h
31a32
> #import <EOControl/EODefines.h>
33c34,35
< extern NSString *EOGlobalIDChangedNotification;
---
>
> EOCONTROL_EXPORT NSString *EOGlobalIDChangedNotification;

Index: EONSAddOns.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EONSAddOns.m,v
retrieving revision 1.4
diff -r1.4 EONSAddOns.m
63c63
<       id object = nil;
---
>       volatile id object = nil;
76c76
<                         withObject: object];
---
>                         withObject: (id)object];
125c125
<   id object = nil;
---
>   volatile id object = nil;
185c185
<   id object = nil;
---
>   volatile id object = nil;
243c243
<   id object = nil;
---
>   volatile id object = nil;


Index: EONull.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EONull.h,v
retrieving revision 1.2
diff -r1.2 EONull.h
31a32,33
> #import <EOControl/EODefines.h>
>
44c46
< extern BOOL isNilOrEONull(id v);
---
> EOCONTROL_EXPORT BOOL isNilOrEONull(id v);


Index: EOObjectStore.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOObjectStore.h,v
retrieving revision 1.2
diff -r1.2 EOObjectStore.h
31a32,33
> #import <EOControl/EODefines.h>
>
86c88
< extern NSString *EOObjectsChangedInStoreNotification;
---
> EOCONTROL_EXPORT NSString *EOObjectsChangedInStoreNotification;
88c90
< extern NSString *EOInvalidatedAllObjectsInStoreNotification;
---
> EOCONTROL_EXPORT NSString *EOInvalidatedAllObjectsInStoreNotification;
90,93c92,95
< extern NSString *EODeletedKey;
< extern NSString *EOInsertedKey;
< extern NSString *EOInvalidatedKey;
< extern NSString *EOUpdatedKey;
---
> EOCONTROL_EXPORT NSString *EODeletedKey;
> EOCONTROL_EXPORT NSString *EOInsertedKey;
> EOCONTROL_EXPORT NSString *EOInvalidatedKey;
> EOCONTROL_EXPORT NSString *EOUpdatedKey;

Index: EOOrQualifier.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOOrQualifier.m,v
retrieving revision 1.7
diff -r1.7 EOOrQualifier.m
56c56
<   return [[[self alloc] initWithQualifierArray: array] autorelease];
---
>   return AUTORELEASE([[self alloc] initWithQualifierArray: array]);
89c89
<   NSMutableArray *qualArray = [NSMutableArray array];
---
>   NSMutableArray *qualArray = [[NSMutableArray alloc] init];
91a92
>   id result;
102c103,106
<   return [self initWithQualifierArray: qualArray];
---
>   result = [self initWithQualifierArray: qualArray];
>   RELEASE(qualArray);
>
>   return result;
137c141
<  * returns YES as soon as the first qualifier retuns YES.
---
>  * returns YES as soon as the first qualifier returns YES.


Index: EOQualifier.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOQualifier.m,v
retrieving revision 1.9
diff -r1.9 EOQualifier.m
927a928,960
> }
>
> @end
>
> @implementation NSArray (EOQualifierExtras)
>
> - (NSArray *)filteredArrayUsingQualifier: (EOQualifier *)qualifier
> {
>     unsigned       max = [self count];
>
>     if(max != 0){
>         // This optimization allows a (measured) speed gain
>         // of 10% over normal use of method calls
>         unsigned           i = 0;
> NSMutableArray *result = [NSMutableArray arrayWithCapacity:max];
>         SEL                                oaiSEL = @selector(objectAtIndex:);
> id (*oaiIMP)(id, SEL, int) = (id (*)(id, SEL, int))[self methodForSelector:oaiSEL];
>         SEL                                ewoSEL = 
@selector(evaluateWithObject:);
> BOOL (*ewoIMP)(id, SEL, id) = (BOOL (*)(id, SEL, id))[qualifier methodForSelector:ewoSEL];
>         SEL                                aoSEL = @selector(addObject:);
> void (*aoIMP)(id, SEL, id) = (void (*)(id, SEL, id))[result methodForSelector:aoSEL];
>
>         for(; i < max; i++){
>             id     anObject = (*oaiIMP)(self, oaiSEL, i);
>
>             if((*ewoIMP)(qualifier, ewoSEL, anObject))
>                 (*aoIMP)(result, aoSEL, anObject);
>         }
>         return result;
>     }
>     else
>         return self;
>


Index: EOSortOrdering.h
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOSortOrdering.h,v
retrieving revision 1.2
diff -r1.2 EOSortOrdering.h
37c37
< @interface EOSortOrdering : NSObject <NSCoding>
---
> @interface EOSortOrdering : NSObject <NSCoding, NSCopying>


Index: EOSortOrdering.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/dev-libs/gdl2/EOControl/EOSortOrdering.m,v
retrieving revision 1.6
diff -r1.6 EOSortOrdering.m
82a83,89
> - (id)copyWithZone:(NSZone *)zone
> {
>     if (NSShouldRetainWithZone(self, zone))
>         return RETAIN(self);
> return [[[self class] allocWithZone:zone] initWithKey:_key selector:_selector];
> }
>
134c141
< - (void) encodeWithKeyValueArchiver: (EOKeyValueUnarchiver*)archiver
---
> - (void) encodeWithKeyValueArchiver: (EOKeyValueArchiver*)archiver
136c143,145
<   [self notImplemented: _cmd];
---
>   [archiver encodeObject:_key forKey:@"key"];
>   if(_selector)
> [archiver encodeObject:NSStringFromSelector(_selector) forKey:@"selectorName"];





reply via email to

[Prev in Thread] Current Thread [Next in Thread]