Skip to content

Commit

Permalink
CF warning cleanup. fixed case on -[NSMutableArray exchangeObjectAtIn…
Browse files Browse the repository at this point in the history
…dex:withObjectAtIndex:]

git-svn-id: http://cocotron.googlecode.com/svn/trunk@495 43251c19-cd1f-0410-9ec0-95c558c233a8
  • Loading branch information
cocotron committed Jun 10, 2009
1 parent bfff846 commit 49c7427
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 16 deletions.
9 changes: 0 additions & 9 deletions CoreFoundation/CFAllocator.h

This file was deleted.

2 changes: 1 addition & 1 deletion CoreFoundation/CFBase.m
Expand Up @@ -75,7 +75,7 @@ CFHashCode CFHash(CFTypeRef self){
}

Boolean CFEqual(CFTypeRef self,CFTypeRef other){
return [(id) self idEqual:other];
return [(id) self isEqual:(id)other];
}

CFStringRef CFCopyTypeIDDescription(CFTypeID typeID){
Expand Down
94 changes: 94 additions & 0 deletions CoreFoundation/CFSocket.m
Expand Up @@ -6,6 +6,98 @@

#define NSSocketCast(_) ((NSSocket *)_)

@implementation NSSocket(CFSocket)

+(CFTypeID)typeID {
NSInvalidAbstractInvocation();
return 0;
}

+(CFSocketRef)createWithAllocator:(CFAllocatorRef)allocator protocolFamily:(CFInteger)protocolFamily type:(CFInteger)socketType protocol:(CFInteger)protocol options:(CFOptionFlags)flags callback:(CFSocketCallBack)callback context:(const CFSocketContext *)context {
NSInvalidAbstractInvocation();
return 0;
}

+(CFSocketRef)createConnectedWithAllocator:(CFAllocatorRef)allocator signature:(const CFSocketSignature *)signature options:(CFOptionFlags)flags callback:(CFSocketCallBack)callback context:(const CFSocketContext *)context timeout:(CFTimeInterval)timeout {
NSInvalidAbstractInvocation();
return 0;
}

+(CFSocketRef)createWithAllocator:(CFAllocatorRef)allocator native:(CFSocketNativeHandle)native options:(CFOptionFlags)flag callback:(CFSocketCallBack)callback context:(const CFSocketContext *)context {
NSInvalidAbstractInvocation();
return 0;
}

+(CFSocketRef)createWithAllocator:(CFAllocatorRef)allocator signature:(const CFSocketSignature *)signature options:(CFOptionFlags)flags callback:(CFSocketCallBack)callback context:(const CFSocketContext *)context {
NSInvalidAbstractInvocation();
return 0;
}

-(CFSocketError)connectToAddress:(CFDataRef)address timeout:(CFTimeInterval)timeout {
NSInvalidAbstractInvocation();
return 0;
}

-(CFDataRef)copyAddress {
NSInvalidAbstractInvocation();
return 0;
}

-(CFDataRef)copyPeerAddress {
NSInvalidAbstractInvocation();
return 0;
}

-(CFRunLoopSourceRef)createRunLoopSourceWithAllocator:(CFAllocatorRef)allocator order:(CFIndex)order {
NSInvalidAbstractInvocation();
return 0;
}

-(void)disableCallBacks:(CFOptionFlags)mask {
NSInvalidAbstractInvocation();
}

-(void)enableCallBacks:(CFOptionFlags)mask {
NSInvalidAbstractInvocation();
}

-(void)getContext:(CFSocketContext *)context {
NSInvalidAbstractInvocation();
}

-(CFSocketNativeHandle)native {
NSInvalidAbstractInvocation();
return 0;
}

-(CFOptionFlags)socketFlags {
NSInvalidAbstractInvocation();
return 0;
}

-(void)invalidate {
NSInvalidAbstractInvocation();
}

-(Boolean)isValid {
NSInvalidAbstractInvocation();
return 0;
}

-(CFSocketError)sendToAddress:(CFDataRef)address data:(CFDataRef)data timeout:(CFTimeInterval)timeout {
NSInvalidAbstractInvocation();
return 0;
}

-(CFSocketError)setAddress:(CFDataRef)address {
NSInvalidAbstractInvocation();
return 0;
}

-(void)setSocketFlags:(CFOptionFlags)flags {
NSInvalidAbstractInvocation();
}

CFTypeID CFSocketGetTypeID() {
return [NSSocket typeID];
}
Expand Down Expand Up @@ -82,4 +174,6 @@ void CFSocketSetSocketFlags(CFSocketRef self,CFOptionFlags flags) {
[NSSocketCast(self) setSocketFlags:flags];
}

@end

#endif
4 changes: 0 additions & 4 deletions CoreFoundation/CoreFoundation.xcodeproj/project.pbxproj
Expand Up @@ -8,7 +8,6 @@

/* Begin PBXBuildFile section */
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
FE03F1C30FDFF65F008260E9 /* CFAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = FE03F19E0FDFF65F008260E9 /* CFAllocator.h */; };
FEE0F9CD0DC962D600598037 /* CFBase.h in Headers */ = {isa = PBXBuildFile; fileRef = FEE0F9C60DC962D600598037 /* CFBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
FEE0F9CE0DC962D600598037 /* CFLocale.h in Headers */ = {isa = PBXBuildFile; fileRef = FEE0F9C70DC962D600598037 /* CFLocale.h */; settings = {ATTRIBUTES = (Public, ); }; };
FEE0F9D00DC962D600598037 /* CFNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = FEE0F9C90DC962D600598037 /* CFNumber.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -65,7 +64,6 @@
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DC2EF5B0486A6940098B216 /* CoreFoundation.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = CoreFoundation.framework; sourceTree = BUILT_PRODUCTS_DIR; };
FE03F19E0FDFF65F008260E9 /* CFAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFAllocator.h; sourceTree = "<group>"; };
FEE0F9C60DC962D600598037 /* CFBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFBase.h; sourceTree = "<group>"; };
FEE0F9C70DC962D600598037 /* CFLocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFLocale.h; sourceTree = "<group>"; };
FEE0F9C90DC962D600598037 /* CFNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFNumber.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -129,7 +127,6 @@
0867D691FE84028FC02AAC07 /* CoreFoundation */ = {
isa = PBXGroup;
children = (
FE03F19E0FDFF65F008260E9 /* CFAllocator.h */,
FEED22530EFB669D004E378B /* CFArray.h */,
FEED22540EFB669D004E378B /* CFAttributedString.h */,
FEED22550EFB669D004E378B /* CFBag.h */,
Expand Down Expand Up @@ -262,7 +259,6 @@
FEED22940EFB669D004E378B /* CFUUID.h in Headers */,
FEED22950EFB669D004E378B /* CFXMLNode.h in Headers */,
FEED22960EFB669D004E378B /* CFXMLParser.h in Headers */,
FE03F1C30FDFF65F008260E9 /* CFAllocator.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion Foundation/NSArray/NSMutableArray.h
Expand Up @@ -35,7 +35,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
-(void)replaceObjectAtIndex:(NSUInteger)index withObject:object;
-(void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray *)array;
-(void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray *)array range:(NSRange)otherRange;
-(void)exchangeobjectAtIndex:(NSUInteger)index withobjectAtIndex:(NSUInteger)other;
-(void)exchangeObjectAtIndex:(NSUInteger)index withObjectAtIndex:(NSUInteger)other;

-(void)sortUsingSelector:(SEL)selector;
-(void)sortUsingFunction:(NSInteger (*)(id, id, void *))compare context:(void *)context;
Expand Down
2 changes: 1 addition & 1 deletion Foundation/NSArray/NSMutableArray.m
Expand Up @@ -359,7 +359,7 @@ -(void)replaceObjectsInRange:(NSRange)range
}
}

-(void)exchangeobjectAtIndex:(NSUInteger)index withobjectAtIndex:(NSUInteger)other {
-(void)exchangeObjectAtIndex:(NSUInteger)index withObjectAtIndex:(NSUInteger)other {
id object=[[self objectAtIndex:index] retain];
id otherObject=[self objectAtIndex:other];

Expand Down

0 comments on commit 49c7427

Please sign in to comment.