diff --git a/ChangeLog b/ChangeLog index 119d33f1f..df6518426 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-03-16 Wolfgang Sourdeau + * OpenChange/MAPIStoreTypes.m (MAPICNCompare): added as void * + parameter so that the function can be used as a comparator + function in NSArray sort methods. + * OpenChange/MAPIStoreMailFolder.m (-getPidTagMessageClass:inMemCtx:): removed method, as folders are not supposed to return a PidTagMessageClass attribute. diff --git a/OpenChange/MAPIStoreGCSFolder.m b/OpenChange/MAPIStoreGCSFolder.m index cf777ca3c..0464b5b97 100644 --- a/OpenChange/MAPIStoreGCSFolder.m +++ b/OpenChange/MAPIStoreGCSFolder.m @@ -631,11 +631,11 @@ static Class NSNumberK; currentChangeNum = [[messageEntry objectForKey: @"version"] unsignedLongLongValue]; - if (MAPICNCompare (changeNum, currentChangeNum) + if (MAPICNCompare (changeNum, currentChangeNum, NULL) == NSOrderedAscending) { [(NSMutableArray *) deletedKeys addObject: cName]; - if (MAPICNCompare (maxChangeNum, currentChangeNum) + if (MAPICNCompare (maxChangeNum, currentChangeNum, NULL) == NSOrderedAscending) maxChangeNum = currentChangeNum; } diff --git a/OpenChange/MAPIStoreTypes.h b/OpenChange/MAPIStoreTypes.h index 5a8e3fb42..1fec6a6a7 100644 --- a/OpenChange/MAPIStoreTypes.h +++ b/OpenChange/MAPIStoreTypes.h @@ -42,7 +42,7 @@ id NSObjectFromSPropValue (const struct SPropValue *); id NSObjectFromMAPISPropValue (const struct mapi_SPropValue *); id NSObjectFromValuePointer (enum MAPITAGS, const void *); -NSComparisonResult MAPICNCompare (uint64_t cn1, uint64_t cn2); +NSComparisonResult MAPICNCompare (uint64_t cn1, uint64_t cn2, void *); NSComparisonResult MAPIChangeKeyGUIDCompare (NSData *ck1, NSData *ck2, void *); static inline NSNumber * diff --git a/OpenChange/MAPIStoreTypes.m b/OpenChange/MAPIStoreTypes.m index b7cd9bb98..c294dd429 100644 --- a/OpenChange/MAPIStoreTypes.m +++ b/OpenChange/MAPIStoreTypes.m @@ -284,7 +284,7 @@ _reverseCN (uint64_t cn) } NSComparisonResult -MAPICNCompare (uint64_t cn1, uint64_t cn2) +MAPICNCompare (uint64_t cn1, uint64_t cn2, void *unused) { NSComparisonResult result;