adium/adium

d21df1d754ed
Parents 55e80b438bbd
Children 2a496682411b
ARC-ify FriBidi, AdiumApplescriptRunner, and Spotlight Importer.
--- a/Frameworks/AIUtilities Framework/Source/NSCalendarDate+ISO8601Parsing.m Mon Jan 23 22:30:16 2012 -0500
+++ b/Frameworks/AIUtilities Framework/Source/NSCalendarDate+ISO8601Parsing.m Wed Jan 25 01:24:41 2012 -0500
@@ -579,12 +579,11 @@
static NSInteger lastUsedSecondsFromGMT = NSNotFound;
static NSTimeZone *lastUsedTimeZone;
if (secondsFromGMT == lastUsedSecondsFromGMT)
- timeZone = [[lastUsedTimeZone retain] autorelease];
+ timeZone = lastUsedTimeZone;
else
timeZone = [NSTimeZone timeZoneForSecondsFromGMT:secondsFromGMT];
lastUsedSecondsFromGMT = secondsFromGMT;
- [lastUsedTimeZone autorelease];
- lastUsedTimeZone = [timeZone retain];
+ lastUsedTimeZone = timeZone;
}
}
}
--- a/Frameworks/FriBidi Framework/FriBidi.xcconfig Mon Jan 23 22:30:16 2012 -0500
+++ b/Frameworks/FriBidi Framework/FriBidi.xcconfig Wed Jan 25 01:24:41 2012 -0500
@@ -1,8 +1,9 @@
SYMROOT = ../../build
APPLY_RULES_IN_COPY_FILES = YES
INFOPLIST_OUTPUT_FORMAT = binary
-SDKROOT = macosx10.6
+SDKROOT = macosx10.7
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
GCC_PREPROCESSOR_DEFINITIONS = HAVE_CONFIG_H
PLIST_FILE_OUTPUT_FORMAT = binary
-ARCHS = x86_64 i386
+ARCHS = x86_64
+CLANG_ENABLE_OBJC_ARC = YES
--- a/Frameworks/FriBidi Framework/FriBidi.xcodeproj/project.pbxproj Mon Jan 23 22:30:16 2012 -0500
+++ b/Frameworks/FriBidi Framework/FriBidi.xcodeproj/project.pbxproj Wed Jan 25 01:24:41 2012 -0500
@@ -323,6 +323,7 @@
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "FriBidi" */;
compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
@@ -385,39 +386,12 @@
1DEB91AE08733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- COPY_PHASE_STRIP = NO;
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_VERSION = A;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = FriBidi_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- INFOPLIST_FILE = Info.plist;
- LD_DYLIB_INSTALL_NAME = "@rpath/FriBidi.framework/Versions/A/FriBidi";
- PRODUCT_NAME = FriBidi;
- SDKROOT = macosx10.6;
- VALID_ARCHS = "i386 x86_64";
- WRAPPER_EXTENSION = framework;
};
name = Debug;
};
1DEB91AF08733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_VERSION = A;
- GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = FriBidi_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- INFOPLIST_FILE = Info.plist;
- LD_DYLIB_INSTALL_NAME = "@rpath/FriBidi.framework/Versions/A/FriBidi";
- PRODUCT_NAME = FriBidi;
- SDKROOT = macosx;
- WRAPPER_EXTENSION = framework;
};
name = Release;
};
@@ -425,13 +399,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 9719EEEC134129210030317B /* Debug.xcconfig */;
buildSettings = {
- ARCHS = "$(NATIVE_ARCH_ACTUAL)";
- GCC_PREPROCESSOR_DEFINITIONS = HAVE_CONFIG_H;
- GCC_VERSION = 4.2;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- SYMROOT = ../../build;
- VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970 x86_64";
};
name = Debug;
};
@@ -439,17 +406,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 9719EEEE134129210030317B /* Release.xcconfig */;
buildSettings = {
- APPLY_RULES_IN_COPY_FILES = YES;
- ARCHS = (
- x86_64,
- i386,
- );
- GCC_PREPROCESSOR_DEFINITIONS = HAVE_CONFIG_H;
- GCC_VERSION = 4.2;
- INFOPLIST_OUTPUT_FORMAT = binary;
- PLIST_FILE_OUTPUT_FORMAT = binary;
- SDKROOT = macosx;
- SYMROOT = ../../build;
};
name = Release;
};
@@ -457,35 +413,12 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 9719EEED134129210030317B /* Release-Debug.xcconfig */;
buildSettings = {
- APPLY_RULES_IN_COPY_FILES = YES;
- ARCHS = (
- x86_64,
- i386,
- );
- GCC_PREPROCESSOR_DEFINITIONS = HAVE_CONFIG_H;
- GCC_VERSION = 4.2;
- INFOPLIST_OUTPUT_FORMAT = binary;
- PLIST_FILE_OUTPUT_FORMAT = binary;
- SDKROOT = macosx;
- SYMROOT = ../../build;
};
name = "Release-Debug";
};
346637AE0D415806006C9034 /* Release-Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_VERSION = A;
- GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = FriBidi_Prefix.pch;
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- INFOPLIST_FILE = Info.plist;
- LD_DYLIB_INSTALL_NAME = "@rpath/FriBidi.framework/Versions/A/FriBidi";
- PRODUCT_NAME = FriBidi;
- SDKROOT = macosx;
- WRAPPER_EXTENSION = framework;
};
name = "Release-Debug";
};
--- a/Frameworks/FriBidi Framework/NSString-FBAdditions.m Mon Jan 23 22:30:16 2012 -0500
+++ b/Frameworks/FriBidi Framework/NSString-FBAdditions.m Wed Jan 25 01:24:41 2012 -0500
@@ -37,7 +37,7 @@
FriBidiCharType type;
// Get a single character
- uch = (UTF16)CFStringGetCharacterAtIndex((CFStringRef)self, i);
+ uch = (UTF16)CFStringGetCharacterAtIndex((__bridge CFStringRef)self, i);
u = &uch;
f = &fch;
--- a/Other/Adium Spotlight Importer/GetMetadataForFile.m Mon Jan 23 22:30:16 2012 -0500
+++ b/Other/Adium Spotlight Importer/GetMetadataForFile.m Wed Jan 25 01:24:41 2012 -0500
@@ -57,25 +57,23 @@
/* Return TRUE if successful, FALSE if there was no data provided */
Boolean success = FALSE;
- NSAutoreleasePool *pool;
- pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
if (CFStringCompare(contentTypeUTI, (CFStringRef)@"com.adiumx.htmllog", kCFCompareBackwards) == kCFCompareEqualTo) {
- success = GetMetadataForHTMLLog((NSMutableDictionary *)attributes, (NSString *)pathToFile);
+ success = GetMetadataForHTMLLog((__bridge NSMutableDictionary *)attributes, (__bridge NSString *)pathToFile);
} else if (CFStringCompare(contentTypeUTI, (CFStringRef)@"com.adiumx.xmllog", kCFCompareBackwards) == kCFCompareEqualTo) {
- success = GetMetadataForXMLLog((NSMutableDictionary *)attributes, (NSString *)pathToFile);
+ success = GetMetadataForXMLLog((__bridge_transfer NSMutableDictionary *)attributes, (__bridge NSString *)pathToFile);
} else {
NSLog(@"We were passed %@, of type %@, which is an unknown type",pathToFile,contentTypeUTI);
}
- [pool release];
-
return success;
+ }
}
static CFStringRef ResolveUTI(CFStringRef contentTypeUTI, NSURL *urlToFile) {
//Deteremine the UTI type if we weren't passed one
- CFStringRef pathExtension = (CFStringRef)[urlToFile pathExtension];
+ CFStringRef pathExtension = (__bridge CFStringRef)[urlToFile pathExtension];
if (contentTypeUTI == NULL) {
if (CFStringCompare(pathExtension, CFSTR("chatLog"), (kCFCompareBackwards | kCFCompareCaseInsensitive)) == kCFCompareEqualTo) {
contentTypeUTI = CFSTR("com.adiumx.xmllog");
@@ -90,7 +88,7 @@
}
NSData *CopyDataForURL(CFStringRef contentTypeUTI, NSURL *urlToFile) {
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
NSData *content;
contentTypeUTI = ResolveUTI(contentTypeUTI, urlToFile);
@@ -115,14 +113,13 @@
content = nil;
NSLog(@"We were passed %@, of type %@, which is an unknown type", urlToFile, contentTypeUTI);
}
-
- [pool release];
return content;
+ }
}
NSData *CopyDataForFile(CFStringRef contentTypeUTI, CFStringRef pathToFile) {
- return CopyDataForURL(contentTypeUTI, [NSURL fileURLWithPath:(NSString *)pathToFile]);
+ return CopyDataForURL(contentTypeUTI, [NSURL fileURLWithPath:(__bridge NSString *)pathToFile]);
}
CFStringRef CopyTextContentForFileData(CFStringRef contentTypeUTI, NSURL *urlToFile, NSData *fileData) {
@@ -137,7 +134,7 @@
} else if (CFEqual(contentTypeUTI, CFSTR("com.adiumx.xmllog"))) {
result = CopyTextContentForXMLLogData(fileData);
}
- return (CFStringRef)result;
+ return (__bridge CFStringRef)result;
}
/*!
@@ -153,12 +150,12 @@
CFStringRef CopyTextContentForFile(CFStringRef contentTypeUTI,
CFStringRef pathToFile)
{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
NSData *logData = CopyDataForFile(contentTypeUTI, pathToFile);
- CFStringRef textContent = CopyTextContentForFileData(contentTypeUTI, [NSURL fileURLWithPath:(NSString *)pathToFile], logData);
- [pool release];
+ CFStringRef textContent = CopyTextContentForFileData(contentTypeUTI, [NSURL fileURLWithPath:(__bridge NSString *)pathToFile], logData);
return textContent;
+ }
}
/*!
@@ -247,15 +244,12 @@
locale:nil]]
forKey:(NSString *)kMDItemDisplayName];
}
- [otherAuthors release];
-
}
[attributes setObject:@"Chat log"
forKey:(NSString *)kMDItemKind];
[attributes setObject:@"Adium"
forKey:(NSString *)kMDItemCreator];
- [xmlDoc release];
}
else
ret = NO;
@@ -311,7 +305,6 @@
if (xmlDoc) {
NSArray *contentArray = [xmlDoc nodesForXPath:@"//message//text()" error:NULL];
contentString = [contentArray componentsJoinedByString:@" "];
- [xmlDoc release];
}
return contentString;
}
--- a/Other/Adium Spotlight Importer/GetMetadataForHTMLLog-Additions.m Mon Jan 23 22:30:16 2012 -0500
+++ b/Other/Adium Spotlight Importer/GetMetadataForHTMLLog-Additions.m Wed Jan 25 01:24:41 2012 -0500
@@ -129,11 +129,11 @@
NSData *data = [NSData dataWithContentsOfFile:path];
if (data) {
- string = [[[NSString alloc] initWithData:data
- encoding:NSUTF8StringEncoding] autorelease];
+ string = [[NSString alloc] initWithData:data
+ encoding:NSUTF8StringEncoding];
if (!string) {
- string = [[[NSString alloc] initWithData:data
- encoding:NSASCIIStringEncoding] autorelease];
+ string = [[NSString alloc] initWithData:data
+ encoding:NSASCIIStringEncoding];
}
if (!string) {
@@ -163,7 +163,7 @@
- (NSString *)stringByUnescapingFromXMLWithEntities:(NSDictionary *)entities
{
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber10_3) {
- return [(NSString *)CFXMLCreateStringByUnescapingEntities(kCFAllocatorDefault, (CFStringRef)self, (CFDictionaryRef)entities) autorelease];
+ return (__bridge_transfer NSString *)CFXMLCreateStringByUnescapingEntities(kCFAllocatorDefault, (__bridge CFStringRef)self, (__bridge CFDictionaryRef)entities);
} else {
//COMPAT 10.3
--- a/Other/Adium Spotlight Importer/GetMetadataForHTMLLog.m Mon Jan 23 22:30:16 2012 -0500
+++ b/Other/Adium Spotlight Importer/GetMetadataForHTMLLog.m Wed Jan 25 01:24:41 2012 -0500
@@ -111,8 +111,6 @@
[attributes setObject:textContent
forKey:(NSString *)kMDItemTextContent];
}
- [logData release];
- [textContent release];
[attributes setObject:serviceClass
forKey:@"com_adiumX_service"];
--- a/Source/ApplescriptRunner.m Mon Jan 23 22:30:16 2012 -0500
+++ b/Source/ApplescriptRunner.m Wed Jan 25 01:24:41 2012 -0500
@@ -92,9 +92,9 @@
*/
- (void)respondIfReady:(NSNotification *)inNotification
{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
[self applescriptRunnerIsReady];
- [pool release];
+ }
}
/*!
@@ -104,7 +104,7 @@
*/
- (void)executeScript:(NSNotification *)inNotification
{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
NSDictionary *userInfo = [inNotification userInfo];
@@ -156,7 +156,6 @@
}
[containerEvent setParamDescriptor:arguments forKeyword:keyDirectObject];
- [arguments release];
}
//Execute the event
@@ -175,12 +174,11 @@
(resultString ? resultString : @""), @"resultString",
nil]
deliverImmediately:NO];
- [appleScript release];
//Reset the automatic quit timer
[self resetAutomaticQuitTimer];
- [pool release];
+ }
}
/*!
@@ -217,7 +215,7 @@
int main(int argc, const char *argv[])
{
- NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ @autoreleasepool {
{
AIApplescriptRunner *applescriptRunner;
NSProcessInfo *processInfo;
@@ -268,8 +266,7 @@
[[NSNotificationCenter defaultCenter] postNotification:notification];
}
- [applescriptRunner release];
}
- [pool release];
+ }
return EXIT_SUCCESS;
}
--- a/xcconfigs/AdiumApplescriptRunner.xcconfig Mon Jan 23 22:30:16 2012 -0500
+++ b/xcconfigs/AdiumApplescriptRunner.xcconfig Wed Jan 25 01:24:41 2012 -0500
@@ -1,1 +1,2 @@
PRODUCT_NAME = AdiumApplescriptRunner
+CLANG_ENABLE_OBJC_ARC = YES
--- a/xcconfigs/Spotlight Importer.xcconfig Mon Jan 23 22:30:16 2012 -0500
+++ b/xcconfigs/Spotlight Importer.xcconfig Wed Jan 25 01:24:41 2012 -0500
@@ -6,3 +6,4 @@
GCC_GENERATE_DEBUGGING_SYMBOLS = NO
INSTALL_PATH = /Library/Spotlight
LIBRARY_STYLE = bundle
+CLANG_ENABLE_OBJC_ARC = YES