From 028ad4a59c8d04db49d8e0d50ef807fd9ab0f684 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Wed, 17 Aug 2011 17:45:10 +0000 Subject: [PATCH] * Source/Additions/GSMime.m: Use specific IMP type for method returning BOOL value. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33763 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 ++++++- Source/Additions/GSMime.m | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30ea227c4..7888ec231 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-08-17 Fred Kiefer + + * Source/Additions/GSMime.m: Use specific IMP type for method + returning BOOL value. + 2011-08-17 Niels Grewe * config/objc-common.h: Include stdlib.h for the prototype of calloc(). @@ -6,7 +11,7 @@ * Headers/GSIMap.h Additional cast to void* to keep OpenBSD compiler happy. - + 2011-08-15 Richard Frith-Macdonald * Source/Additions/GSMime.m: diff --git a/Source/Additions/GSMime.m b/Source/Additions/GSMime.m index 882755051..b03a1aad6 100644 --- a/Source/Additions/GSMime.m +++ b/Source/Additions/GSMime.m @@ -120,6 +120,8 @@ static Class NSArrayClass = 0; static Class NSStringClass = 0; static Class documentClass = 0; +typedef BOOL (*boolIMP)(id, SEL, id); + @interface GSMimeDocument (Private) - (GSMimeHeader*) _lastHeaderNamed: (NSString*)name; - (NSUInteger) _indexOfHeaderNamed: (NSString*)name; @@ -5371,12 +5373,12 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold, if (count > 0) { IMP imp1; - IMP imp2; + boolIMP imp2; name = [name lowercaseString]; imp1 = [headers methodForSelector: @selector(objectAtIndex:)]; - imp2 = [name methodForSelector: @selector(isEqualToString:)]; + imp2 = (boolIMP)[name methodForSelector: @selector(isEqualToString:)]; while (count-- > 0) { GSMimeHeader *info; @@ -5418,11 +5420,11 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold, { NSUInteger index; IMP imp1; - IMP imp2; + boolIMP imp2; name = [GSMimeHeader makeToken: name preservingCase: NO]; imp1 = [headers methodForSelector: @selector(objectAtIndex:)]; - imp2 = [name methodForSelector: @selector(isEqualToString:)]; + imp2 = (boolIMP)[name methodForSelector: @selector(isEqualToString:)]; for (index = 0; index < count; index++) { GSMimeHeader *info; @@ -5452,10 +5454,10 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold, NSUInteger index; NSMutableArray *array; IMP imp1; - IMP imp2; + boolIMP imp2; imp1 = [headers methodForSelector: @selector(objectAtIndex:)]; - imp2 = [name methodForSelector: @selector(isEqualToString:)]; + imp2 = (boolIMP)[name methodForSelector: @selector(isEqualToString:)]; array = [NSMutableArray array]; for (index = 0; index < count; index++) @@ -6329,7 +6331,7 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold, { NSUInteger index; IMP imp1 = [headers methodForSelector: @selector(objectAtIndex:)]; - IMP imp2 = [name methodForSelector: @selector(isEqualToString:)]; + boolIMP imp2 = (boolIMP)[name methodForSelector: @selector(isEqualToString:)]; for (index = 0; index < count; index++) { @@ -6352,7 +6354,7 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold, if (count > 0) { IMP imp1 = [headers methodForSelector: @selector(objectAtIndex:)]; - IMP imp2 = [name methodForSelector: @selector(isEqualToString:)]; + boolIMP imp2 = (boolIMP)[name methodForSelector: @selector(isEqualToString:)]; while (count-- > 0) {