adium 4165:d87d966e4512: Backed out changeset 4a87584e9e3a

commits at adium.im commits at adium.im
Mon Aug 22 02:13:09 UTC 2011


details:	http://hg.adium.im/adium/rev/d87d966e4512
revision:	4165:d87d966e4512
branch:		(none)
author:		Evan Schoenberg
date:		Sun Aug 21 21:07:09 2011 -0500

Backed out changeset 4a87584e9e3a
Subject: adium 4166:a0800cab4643: backed out credits updates for MAZeroingWeakRef

details:	http://hg.adium.im/adium/rev/a0800cab4643
revision:	4166:a0800cab4643
branch:		(none)
author:		Evan Schoenberg
date:		Sun Aug 21 21:07:53 2011 -0500

backed out credits updates for MAZeroingWeakRef
Subject: adium 4167:98e9b5c10067: Backed out project changes for MAZeroingWeakRef

details:	http://hg.adium.im/adium/rev/98e9b5c10067
revision:	4167:98e9b5c10067
branch:		(none)
author:		Evan Schoenberg
date:		Sun Aug 21 21:08:16 2011 -0500

Backed out project changes for MAZeroingWeakRef
Subject: adium 4168:8a6a2315f373: Removed MAZeroingWeakRef

details:	http://hg.adium.im/adium/rev/8a6a2315f373
revision:	4168:8a6a2315f373
branch:		(none)
author:		Evan Schoenberg
date:		Sun Aug 21 21:08:33 2011 -0500

Removed MAZeroingWeakRef
Subject: adium 4169:0170acde86c5: Upon further reflection, MAZeroingWeakRef isn't necessary for AIProxyListObject; removing it.  We maintain a safe weak reference, because the AIProxyListObject will only be deallocated after its AIListObject deallocates. There may be some edge case with the containing object, but I can't visualize or reproduce a problem, and a zeroing weak ref is probably too heavy and would just be masking some other problem.

details:	http://hg.adium.im/adium/rev/0170acde86c5
revision:	4169:0170acde86c5
branch:		(none)
author:		Evan Schoenberg
date:		Sun Aug 21 21:12:54 2011 -0500

Upon further reflection, MAZeroingWeakRef isn't necessary for AIProxyListObject; removing it.  We maintain a safe weak reference, because the AIProxyListObject will only be deallocated after its AIListObject deallocates. There may be some edge case with the containing object, but I can't visualize or reproduce a problem, and a zeroing weak ref is probably too heavy and would just be masking some other problem.

diffs (truncated from 2659 to 1000 lines):

diff -r 4a87584e9e3a -r 0170acde86c5 Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj	Sun Aug 21 16:37:35 2011 -0500
+++ b/Adium.xcodeproj/project.pbxproj	Sun Aug 21 21:12:54 2011 -0500
@@ -388,14 +388,6 @@
 		346636AC0D415440006C9034 /* FriBidi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3466368B0D41541A006C9034 /* FriBidi.framework */; };
 		346637690D415457006C9034 /* FriBidi.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 3466368B0D41541A006C9034 /* FriBidi.framework */; };
 		346935D60BA6C89D00E1CF7E /* AIFileTransferProgressOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 346935D40BA6C89D00E1CF7E /* AIFileTransferProgressOutlineView.m */; };
-		346B5AD114016ABF00A29B7F /* MANotificationCenterAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 34C4D09113EF436E0054DB25 /* MANotificationCenterAdditions.h */; };
-		346B5AD214016ABF00A29B7F /* MANotificationCenterAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C4D09213EF436E0054DB25 /* MANotificationCenterAdditions.m */; };
-		346B5AD314016ABF00A29B7F /* MAWeakArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 34C4D09313EF436E0054DB25 /* MAWeakArray.h */; };
-		346B5AD414016ABF00A29B7F /* MAWeakArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C4D09413EF436E0054DB25 /* MAWeakArray.m */; };
-		346B5AD514016ABF00A29B7F /* MAWeakDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 34C4D09513EF436E0054DB25 /* MAWeakDictionary.h */; };
-		346B5AD614016ABF00A29B7F /* MAWeakDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C4D09613EF436E0054DB25 /* MAWeakDictionary.m */; };
-		346B5AD714016ABF00A29B7F /* MAZeroingWeakProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 34C4D09713EF436E0054DB25 /* MAZeroingWeakProxy.h */; };
-		346B5AD814016ABF00A29B7F /* MAZeroingWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C4D09813EF436E0054DB25 /* MAZeroingWeakProxy.m */; };
 		346BA33F0774C27400628F06 /* ESGlobalEventsPreferencesPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 346BA33D0774C27400628F06 /* ESGlobalEventsPreferencesPlugin.m */; };
 		346BA3450774C2D200628F06 /* ESGlobalEventsPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 346BA3430774C2D200628F06 /* ESGlobalEventsPreferences.m */; };
 		346BA3640774C35500628F06 /* GlobalEventsPreferences.nib in Resources */ = {isa = PBXBuildFile; fileRef = 346BA3630774C35400628F06 /* GlobalEventsPreferences.nib */; };
@@ -583,7 +575,6 @@
 		34891C140D4B75EE00AEF48C /* AIStandardListScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34891C130D4B75EE00AEF48C /* AIStandardListScrollView.m */; };
 		348B250D0A50A1C900B2B972 /* ESSourceListBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = 348B250B0A50A1C900B2B972 /* ESSourceListBackgroundView.m */; };
 		348C47170D3B20BE00FB6E7A /* AIMessageWindowOutgoingScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 348C47160D3B20BE00FB6E7A /* AIMessageWindowOutgoingScrollView.m */; };
-		348F30E113EFF81700865B0B /* StatusMessage.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0C913EDC2E50032EF52 /* StatusMessage.applescript */; };
 		348F57940936F3CC00288E41 /* ESEditStatusGroupWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 348F57920936F3CC00288E41 /* ESEditStatusGroupWindowController.m */; };
 		348F579E0936FA6D00288E41 /* EditStatusGroup.nib in Resources */ = {isa = PBXBuildFile; fileRef = 348F579D0936FA6D00288E41 /* EditStatusGroup.nib */; };
 		349062A2127F7E6900FC313F /* AITemporaryIRCAccountWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 349062A1127F7E6900FC313F /* AITemporaryIRCAccountWindowController.m */; };
@@ -668,11 +659,6 @@
 		34C14CD307A8B1AB003CC138 /* AIEmoticonPackPreviewView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C14CD107A8B1AB003CC138 /* AIEmoticonPackPreviewView.m */; };
 		34C14D5107A8BA00003CC138 /* EmoticonPackPreview.nib in Resources */ = {isa = PBXBuildFile; fileRef = 34C14D5007A8BA00003CC138 /* EmoticonPackPreview.nib */; };
 		34C18B0D06CAC95400FF5FF9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34E839050583207E00F2AADB /* SystemConfiguration.framework */; };
-		34C4D0A313EF436E0054DB25 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 34C4D08D13EF436E0054DB25 /* LICENSE */; };
-		34C4D0A413EF436E0054DB25 /* README.markdown in Resources */ = {isa = PBXBuildFile; fileRef = 34C4D08E13EF436E0054DB25 /* README.markdown */; };
-		34C4D0B013EF436E0054DB25 /* ZeroingWeakRef_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 34C4D09E13EF436E0054DB25 /* ZeroingWeakRef_Prefix.pch */; };
-		34C4D0BC13EF48270054DB25 /* MAZeroingWeakRef.h in Headers */ = {isa = PBXBuildFile; fileRef = 34C4D09913EF436E0054DB25 /* MAZeroingWeakRef.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		34C4D0BD13EF48270054DB25 /* MAZeroingWeakRef.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C4D09A13EF436E0054DB25 /* MAZeroingWeakRef.m */; };
 		34C68B260778FA1300EB423C /* ESGeneralPreferencesPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C68B240778FA1300EB423C /* ESGeneralPreferencesPlugin.m */; };
 		34C68B2C0778FA5C00EB423C /* ESGeneralPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C68B2A0778FA5C00EB423C /* ESGeneralPreferences.m */; };
 		34C6A3BC077A8CB500EB423C /* AppearanceDefaults.plist in Resources */ = {isa = PBXBuildFile; fileRef = 34C6A3BB077A8CB500EB423C /* AppearanceDefaults.plist */; };
@@ -1143,9 +1129,16 @@
 		5A1781860EC1215D00BA1E04 /* AIAutoScrollTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A1781850EC1215D00BA1E04 /* AIAutoScrollTextView.m */; };
 		5A17D65D130F76B4002C852F /* AIGradientView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A17D65C130F76B4002C852F /* AIGradientView.m */; };
 		5A23E0B513EDB9950032EF52 /* CurrentTunes.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0B413EDB9950032EF52 /* CurrentTunes.applescript */; };
+		5A23E0BC13EDB9CD0032EF52 /* AdiumAddressBookAction_AIM.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0B613EDB9CD0032EF52 /* AdiumAddressBookAction_AIM.applescript */; };
+		5A23E0BD13EDB9CD0032EF52 /* AdiumAddressBookAction_ICQ.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0B713EDB9CD0032EF52 /* AdiumAddressBookAction_ICQ.applescript */; };
+		5A23E0BE13EDB9CD0032EF52 /* AdiumAddressBookAction_Jabber.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0B813EDB9CD0032EF52 /* AdiumAddressBookAction_Jabber.applescript */; };
+		5A23E0BF13EDB9CD0032EF52 /* AdiumAddressBookAction_MSN.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0B913EDB9CD0032EF52 /* AdiumAddressBookAction_MSN.applescript */; };
+		5A23E0C013EDB9CD0032EF52 /* AdiumAddressBookAction_SMS.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0BA13EDB9CD0032EF52 /* AdiumAddressBookAction_SMS.applescript */; };
+		5A23E0C113EDB9CD0032EF52 /* AdiumAddressBookAction_Yahoo.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0BB13EDB9CD0032EF52 /* AdiumAddressBookAction_Yahoo.applescript */; };
 		5A23E0CB13EDC2E50032EF52 /* ActiveApplication.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0C613EDC2E50032EF52 /* ActiveApplication.applescript */; };
 		5A23E0CC13EDC2E50032EF52 /* AdiumBuild.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0C713EDC2E50032EF52 /* AdiumBuild.applescript */; };
 		5A23E0CD13EDC2E50032EF52 /* AdiumVersion.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0C813EDC2E50032EF52 /* AdiumVersion.applescript */; };
+		5A23E0CE13EDC2E50032EF52 /* StatusMessage.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0C913EDC2E50032EF52 /* StatusMessage.applescript */; };
 		5A23E0CF13EDC2E50032EF52 /* Uptime.applescript in Sources */ = {isa = PBXBuildFile; fileRef = 5A23E0CA13EDC2E50032EF52 /* Uptime.applescript */; };
 		5A5F601D12962EC0007A2232 /* AISegmentedControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 5A5F601A12962D06007A2232 /* AISegmentedControl.m */; };
 		5A5F601E12962ECE007A2232 /* AISegmentedControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A5F601912962D06007A2232 /* AISegmentedControl.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -3556,19 +3549,6 @@
 		34C2E6880634CF940018E5D2 /* ESPurpleNovellAccountViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ESPurpleNovellAccountViewController.m; path = "Plugins/Purple Service/ESPurpleNovellAccountViewController.m"; sourceTree = "<group>"; };
 		34C2EA180634DB5E0018E5D2 /* ESNovellService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ESNovellService.h; path = "Plugins/Purple Service/ESNovellService.h"; sourceTree = "<group>"; };
 		34C2EA190634DB5E0018E5D2 /* ESNovellService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ESNovellService.m; path = "Plugins/Purple Service/ESNovellService.m"; sourceTree = "<group>"; };
-		34C4D08D13EF436E0054DB25 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
-		34C4D08E13EF436E0054DB25 /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.markdown; sourceTree = "<group>"; };
-		34C4D09113EF436E0054DB25 /* MANotificationCenterAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MANotificationCenterAdditions.h; sourceTree = "<group>"; };
-		34C4D09213EF436E0054DB25 /* MANotificationCenterAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MANotificationCenterAdditions.m; sourceTree = "<group>"; };
-		34C4D09313EF436E0054DB25 /* MAWeakArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MAWeakArray.h; sourceTree = "<group>"; };
-		34C4D09413EF436E0054DB25 /* MAWeakArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MAWeakArray.m; sourceTree = "<group>"; };
-		34C4D09513EF436E0054DB25 /* MAWeakDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MAWeakDictionary.h; sourceTree = "<group>"; };
-		34C4D09613EF436E0054DB25 /* MAWeakDictionary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MAWeakDictionary.m; sourceTree = "<group>"; };
-		34C4D09713EF436E0054DB25 /* MAZeroingWeakProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MAZeroingWeakProxy.h; sourceTree = "<group>"; };
-		34C4D09813EF436E0054DB25 /* MAZeroingWeakProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MAZeroingWeakProxy.m; sourceTree = "<group>"; };
-		34C4D09913EF436E0054DB25 /* MAZeroingWeakRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MAZeroingWeakRef.h; sourceTree = "<group>"; };
-		34C4D09A13EF436E0054DB25 /* MAZeroingWeakRef.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MAZeroingWeakRef.m; sourceTree = "<group>"; };
-		34C4D09E13EF436E0054DB25 /* ZeroingWeakRef_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZeroingWeakRef_Prefix.pch; sourceTree = "<group>"; };
 		34C4E3A20DF9D73600499AC0 /* it */ = {isa = PBXFileReference; lastKnownFileType = folder; name = it; path = "Resources/it.lproj/Shared Dock Icon Images"; sourceTree = "<group>"; };
 		34C68B230778FA1300EB423C /* ESGeneralPreferencesPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ESGeneralPreferencesPlugin.h; path = "Plugins/General Preferences/ESGeneralPreferencesPlugin.h"; sourceTree = "<group>"; };
 		34C68B240778FA1300EB423C /* ESGeneralPreferencesPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ESGeneralPreferencesPlugin.m; path = "Plugins/General Preferences/ESGeneralPreferencesPlugin.m"; sourceTree = "<group>"; };
@@ -6307,35 +6287,6 @@
 			name = "Novell GroupWise";
 			sourceTree = "<group>";
 		};
-		34C4D08C13EF436E0054DB25 /* MAZeroingWeakRef */ = {
-			isa = PBXGroup;
-			children = (
-				34C4D08D13EF436E0054DB25 /* LICENSE */,
-				34C4D08E13EF436E0054DB25 /* README.markdown */,
-				34C4D08F13EF436E0054DB25 /* Source */,
-				34C4D09E13EF436E0054DB25 /* ZeroingWeakRef_Prefix.pch */,
-			);
-			name = MAZeroingWeakRef;
-			path = Frameworks/MAZeroingWeakRef;
-			sourceTree = "<group>";
-		};
-		34C4D08F13EF436E0054DB25 /* Source */ = {
-			isa = PBXGroup;
-			children = (
-				34C4D09113EF436E0054DB25 /* MANotificationCenterAdditions.h */,
-				34C4D09213EF436E0054DB25 /* MANotificationCenterAdditions.m */,
-				34C4D09313EF436E0054DB25 /* MAWeakArray.h */,
-				34C4D09413EF436E0054DB25 /* MAWeakArray.m */,
-				34C4D09513EF436E0054DB25 /* MAWeakDictionary.h */,
-				34C4D09613EF436E0054DB25 /* MAWeakDictionary.m */,
-				34C4D09713EF436E0054DB25 /* MAZeroingWeakProxy.h */,
-				34C4D09813EF436E0054DB25 /* MAZeroingWeakProxy.m */,
-				34C4D09913EF436E0054DB25 /* MAZeroingWeakRef.h */,
-				34C4D09A13EF436E0054DB25 /* MAZeroingWeakRef.m */,
-			);
-			path = Source;
-			sourceTree = "<group>";
-		};
 		34C68B1C0778F9C200EB423C /* General Preferences */ = {
 			isa = PBXGroup;
 			children = (
@@ -6432,7 +6383,6 @@
 		34D8342B07CBE6A4006466F2 /* External Sources */ = {
 			isa = PBXGroup;
 			children = (
-				34C4D08C13EF436E0054DB25 /* MAZeroingWeakRef */,
 				34D834CD07CBE7A3006466F2 /* Text field for previewing font preferences */,
 				348B25C70A50FBF300B2B972 /* KNShelfSplitView.h */,
 				348B25C60A50FBF300B2B972 /* KNShelfSplitView.m */,
@@ -8725,8 +8675,8 @@
 				4B82138F049CA6CC00A8010A /* AIChat.m */,
 				4BF5BA14042F3CB200A8010A /* AIListObject.h */,
 				4BF5BA15042F3CB200A8010A /* AIListObject.m */,
+				63B0EC9A0F8FBB660062476B /* AIProxyListObject.m */,
 				63B0EC9B0F8FBB660062476B /* AIProxyListObject.h */,
-				63B0EC9A0F8FBB660062476B /* AIProxyListObject.m */,
 				4BF5BA12042F3CB200A8010A /* AIListGroup.h */,
 				4BF5BA13042F3CB200A8010A /* AIListGroup.m */,
 				63DF5B210E52D77F00010E99 /* AIContactList.h */,
@@ -9109,7 +9059,6 @@
 				34D8154613B663700022C8C4 /* JSONKit.h in Headers */,
 				34D8154E13B663A80022C8C4 /* auth_fb.h in Headers */,
 				34D8155013B663A80022C8C4 /* fbapi.h in Headers */,
-				34C4D0B013EF436E0054DB25 /* ZeroingWeakRef_Prefix.pch in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -9242,11 +9191,6 @@
 				34F17FCE0F8EAC34009C5A39 /* AIListOutlineView+Drawing.h in Headers */,
 				63B0EC9D0F8FBB660062476B /* AIProxyListObject.h in Headers */,
 				118199C610D0B65A003E8ECA /* AIMedia.h in Headers */,
-				34C4D0BC13EF48270054DB25 /* MAZeroingWeakRef.h in Headers */,
-				346B5AD114016ABF00A29B7F /* MANotificationCenterAdditions.h in Headers */,
-				346B5AD314016ABF00A29B7F /* MAWeakArray.h in Headers */,
-				346B5AD514016ABF00A29B7F /* MAWeakDictionary.h in Headers */,
-				346B5AD714016ABF00A29B7F /* MAZeroingWeakProxy.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -9695,8 +9639,6 @@
 				34D8153F13B663650022C8C4 /* AIFacebookXMPPOauthWebViewWindow.xib in Resources */,
 				34C8D06C13B688670073718A /* f_logo_small.png in Resources */,
 				34C8D06D13B688670073718A /* f_logo.png in Resources */,
-				34C4D0A313EF436E0054DB25 /* LICENSE in Resources */,
-				34C4D0A413EF436E0054DB25 /* README.markdown in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -10633,8 +10575,8 @@
 				5A23E0CB13EDC2E50032EF52 /* ActiveApplication.applescript in Sources */,
 				5A23E0CC13EDC2E50032EF52 /* AdiumBuild.applescript in Sources */,
 				5A23E0CD13EDC2E50032EF52 /* AdiumVersion.applescript in Sources */,
+				5A23E0CE13EDC2E50032EF52 /* StatusMessage.applescript in Sources */,
 				5A23E0CF13EDC2E50032EF52 /* Uptime.applescript in Sources */,
-				348F30E113EFF81700865B0B /* StatusMessage.applescript in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -10745,11 +10687,12 @@
 				34F17FCF0F8EAC34009C5A39 /* AIListOutlineView+Drawing.m in Sources */,
 				63B0EC9C0F8FBB660062476B /* AIProxyListObject.m in Sources */,
 				118199C710D0B65A003E8ECA /* AIMedia.m in Sources */,
-				34C4D0BD13EF48270054DB25 /* MAZeroingWeakRef.m in Sources */,
-				346B5AD214016ABF00A29B7F /* MANotificationCenterAdditions.m in Sources */,
-				346B5AD414016ABF00A29B7F /* MAWeakArray.m in Sources */,
-				346B5AD614016ABF00A29B7F /* MAWeakDictionary.m in Sources */,
-				346B5AD814016ABF00A29B7F /* MAZeroingWeakProxy.m in Sources */,
+				5A23E0BC13EDB9CD0032EF52 /* AdiumAddressBookAction_AIM.applescript in Sources */,
+				5A23E0BD13EDB9CD0032EF52 /* AdiumAddressBookAction_ICQ.applescript in Sources */,
+				5A23E0BE13EDB9CD0032EF52 /* AdiumAddressBookAction_Jabber.applescript in Sources */,
+				5A23E0BF13EDB9CD0032EF52 /* AdiumAddressBookAction_MSN.applescript in Sources */,
+				5A23E0C013EDB9CD0032EF52 /* AdiumAddressBookAction_SMS.applescript in Sources */,
+				5A23E0C113EDB9CD0032EF52 /* AdiumAddressBookAction_Yahoo.applescript in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/Adium Framework/Source/AIProxyListObject.h
--- a/Frameworks/Adium Framework/Source/AIProxyListObject.h	Sun Aug 21 16:37:35 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIProxyListObject.h	Sun Aug 21 21:12:54 2011 -0500
@@ -18,8 +18,8 @@
 @protocol AIContainingObject;
 
 @interface AIProxyListObject : NSObject {
-	MAZeroingWeakRef *weakRef_listObject;
-    MAZeroingWeakRef *weakRef_containingObject;
+	AIListObject *listObject;
+    ESObjectWithProperties <AIContainingObject> *containingObject;
 	NSString *key;
 	NSString *cachedDisplayNameString;
 	NSAttributedString *cachedDisplayName;
@@ -33,12 +33,8 @@
 
 @property (nonatomic, retain) NSString *key;
 
-- (AIListObject *)listObject;
-- (void)setListObject:(AIListObject *)inListObject;
-
-- (ESObjectWithProperties <AIContainingObject> *)containingObject;
-- (void)setContainingObject:(ESObjectWithProperties <AIContainingObject> *)containingObject;
-
+ at property (nonatomic, assign) AIListObject *listObject;
+ at property (nonatomic, assign) ESObjectWithProperties <AIContainingObject> * containingObject;
 
 + (AIProxyListObject *)proxyListObjectForListObject:(ESObjectWithProperties *)inListObject
 									   inListObject:(ESObjectWithProperties<AIContainingObject> *)containingObject;
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/Adium Framework/Source/AIProxyListObject.m
--- a/Frameworks/Adium Framework/Source/AIProxyListObject.m	Sun Aug 21 16:37:35 2011 -0500
+++ b/Frameworks/Adium Framework/Source/AIProxyListObject.m	Sun Aug 21 21:12:54 2011 -0500
@@ -26,6 +26,7 @@
 @implementation AIProxyListObject
 
 @synthesize key, cachedDisplayName, cachedDisplayNameString, cachedLabelAttributes, cachedDisplayNameSize;
+ at synthesize listObject, containingObject;
 
 static NSMutableDictionary *proxyDict;
 
@@ -100,37 +101,12 @@
 {
 	AILogWithSignature(@"%@", self);
 	self.key = nil;
-    [weakRef_listObject release];
-    [weakRef_containingObject release];
 
     [self flushCache];
 	
 	[super dealloc];
 }
 
-- (AIListObject *)listObject
-{
-    return [weakRef_listObject target];
-}
-
-- (void)setListObject:(AIListObject *)inListObject
-{
-    [weakRef_listObject release];
-    weakRef_listObject = [[MAZeroingWeakRef alloc] initWithTarget: inListObject];
-}
-
-- (ESObjectWithProperties<AIContainingObject> *)containingObject
-{
-    return (ESObjectWithProperties<AIContainingObject> *)[weakRef_listObject target];
-}
-
-- (void)setContainingObject:(ESObjectWithProperties<AIContainingObject> *)inContainingObject
-{
-    [weakRef_containingObject release];
-    weakRef_containingObject = [[MAZeroingWeakRef alloc] initWithTarget:(id)inContainingObject];
-}
-
-
 /* Pretend to be our listObject. I suspect being an NSProxy subclass could do this more cleanly, but my initial attempt
  * failed and this works fine.
  */
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/LICENSE
--- a/Frameworks/MAZeroingWeakRef/LICENSE	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-MAZeroingWeakRef and all code associated with it is distributed under a BSD license, as listed below.
-
-
-Copyright (c) 2010, Michael Ash
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-Neither the name of Michael Ash nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/README.markdown
--- a/Frameworks/MAZeroingWeakRef/README.markdown	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-MAZeroingWeakRef - by Mike Ash - mike at mikeash.com
-
-Introduction
-------------
-
-MAZeroingWeakRef is a library for using zeroing weak references in retain/release Cocoa and Cocoa Touch code. These are references which do not keep an object alive, and which automatically become nil once the object is destroyed.
-
-MAZeroingWeakRef does not work under Cocoa garbage collection. The built-in __weak specifier exists for that, although it is used somewhat differently.
-
-The API is simple and mostly self-explanatory from the header file. Note that cleanup blocks are only needed for advanced uses when you need to take more action than simply zeroing the reference when the target object is destroyed. Be sure to heed the warning in the header about not doing too much work in the cleanup block.
-
-In order to allow weak references to CoreFoundation bridged objects, a fair amount of crazy hacking of private APIs had to be done. For people who don't like that sort of thing, or who are worried about rejection when building for iOS, this crazy hacking can be reduced or disabled altogether. Look at the COREFOUNDATION_HACK_LEVEL macro in MAZeroingWeakRef.m, and the comment above it which explains what the different levels do.
-
-A similar KVO_HACK_LEVEL macro is also available.
-
-App Store
----------
-
-For iOS work, or Mac App Store work, you will probably want to set both COREFOUNDATION_HACK_LEVEL and KVO_HACK_LEVEL to `0`. In this mode, MAZeroingWeakRef uses no private APIs.
-
-Source Code
------------
-
-The MAZeroingWeakRef code is available from GitHub:
-
-    http://github.com/mikeash/MAZeroingWeakRef
-
-MAZeroingWeakRef is made available under a BSD license.
-
-More Information
-----------------
-
-For more information about it, this blog post gives a basic introduction to the API:
-
-    http://mikeash.com/pyblog/introducing-mazeroingweakref.html
-
-This describes how it works in most cases:
-
-http://mikeash.com/pyblog/friday-qa-2010-07-16-zeroing-weak-references-in-objective-c.html
-
-And this describes some of the more hairy parts:
-
-    http://mikeash.com/pyblog/friday-qa-2010-07-30-zeroing-weak-references-to-corefoundation-objects.html
-
-Enjoy!
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MANotificationCenterAdditions.h
--- a/Frameworks/MAZeroingWeakRef/Source/MANotificationCenterAdditions.h	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-//
-//  MANotificationCenterAdditions.h
-//  ZeroingWeakRef
-//
-//  Created by Michael Ash on 7/12/10.
-//
-
-#import <Foundation/Foundation.h>
-
-
- at interface NSNotificationCenter (MAZeroingWeakRefAdditions)
-#if NS_BLOCKS_AVAILABLE
-- (void)addWeakObserver: (id)observer selector: (SEL)selector name: (NSString *)name object: (NSString *)object;
-#endif
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MANotificationCenterAdditions.m
--- a/Frameworks/MAZeroingWeakRef/Source/MANotificationCenterAdditions.m	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-//
-//  MANotificationCenterAdditions.m
-//  ZeroingWeakRef
-//
-//  Created by Michael Ash on 7/12/10.
-//
-
-#import "MANotificationCenterAdditions.h"
-
-#import "MAZeroingWeakRef.h"
-
-
- at implementation NSNotificationCenter (MAZeroingWeakRefAdditions)
-
-#if NS_BLOCKS_AVAILABLE
-
-- (void)addWeakObserver: (id)observer selector: (SEL)selector name: (NSString *)name object: (NSString *)object
-{
-    MAZeroingWeakRef *ref = [[MAZeroingWeakRef alloc] initWithTarget: observer];
-    
-    id noteObj = [self addObserverForName: name object:object queue: nil usingBlock: ^(NSNotification *note) {
-        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-        
-        id anObserver = [ref target];
-        [anObserver performSelector: selector withObject: note];
-        
-        [pool release];
-    }];
-    
-    [ref setCleanupBlock: ^(id target) {
-        [self removeObserver: noteObj];
-        [ref autorelease];
-    }];
-}
-
-#endif
-
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MAWeakArray.h
--- a/Frameworks/MAZeroingWeakRef/Source/MAWeakArray.h	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-//
-//  MAWeakArray.h
-//  ZeroingWeakRef
-//
-//  Created by Mike Ash on 7/13/10.
-//
-
-#import <Foundation/Foundation.h>
-
-
- at interface MAWeakArray : NSMutableArray
-{
-    NSMutableArray *_weakRefs;
-}
-
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MAWeakArray.m
--- a/Frameworks/MAZeroingWeakRef/Source/MAWeakArray.m	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-//
-//  MAWeakArray.m
-//  ZeroingWeakRef
-//
-//  Created by Mike Ash on 7/13/10.
-//
-
-#import "MAWeakArray.h"
-
-#import "MAZeroingWeakRef.h"
-
-
- at implementation MAWeakArray
-
-- (id)init
-{
-    if((self = [super init]))
-    {
-        _weakRefs = [[NSMutableArray alloc] init];
-    }
-    return self;
-}
-
-- (void)dealloc
-{
-    [_weakRefs release];
-    [super dealloc];
-}
-
-- (NSUInteger)count
-{
-    return [_weakRefs count];
-}
-
-- (id)objectAtIndex: (NSUInteger)index
-{
-    return [[_weakRefs objectAtIndex: index] target];
-}
-
-- (void)addObject: (id)anObject
-{
-    [_weakRefs addObject: [MAZeroingWeakRef refWithTarget: anObject]];
-}
-
-- (void)insertObject: (id)anObject atIndex: (NSUInteger)index
-{
-    [_weakRefs insertObject: [MAZeroingWeakRef refWithTarget: anObject]
-                    atIndex: index];
-}
-
-- (void)removeLastObject
-{
-    [_weakRefs removeLastObject];
-}
-
-- (void)removeObjectAtIndex: (NSUInteger)index
-{
-    [_weakRefs removeObjectAtIndex: index];
-}
-
-- (void)replaceObjectAtIndex: (NSUInteger)index withObject: (id)anObject
-{
-    [_weakRefs replaceObjectAtIndex: index
-                         withObject: [MAZeroingWeakRef refWithTarget: anObject]];
-}
-
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MAWeakDictionary.h
--- a/Frameworks/MAZeroingWeakRef/Source/MAWeakDictionary.h	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-//
-//  MAWeakDictionary.h
-//  ZeroingWeakRef
-//
-//  Created by Mike Ash on 7/13/10.
-//
-
-#import <Foundation/Foundation.h>
-
-
- at interface MAWeakDictionary : NSMutableDictionary
-{
-    NSMutableDictionary *_dict;
-}
-
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MAWeakDictionary.m
--- a/Frameworks/MAZeroingWeakRef/Source/MAWeakDictionary.m	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-//
-//  MAWeakDictionary.m
-//  ZeroingWeakRef
-//
-//  Created by Mike Ash on 7/13/10.
-//
-
-#import "MAWeakDictionary.h"
-
-#import "MAZeroingWeakRef.h"
-
-
- at implementation MAWeakDictionary
-
-- (id)init
-{
-    if((self = [super init]))
-    {
-        _dict = [[NSMutableDictionary alloc] init];
-    }
-    return self;
-}
-
-- (void)dealloc
-{
-    [_dict release];
-    [super dealloc];
-}
-
-- (NSUInteger)count
-{
-    return [_dict count];
-}
-
-- (id)objectForKey: (id)aKey
-{
-    MAZeroingWeakRef *ref = [_dict objectForKey: aKey];
-    id obj = [ref target];
-    
-    // clean out keys whose objects have gone away
-    if(ref && !obj)
-        [_dict removeObjectForKey: aKey];
-    
-    return obj;
-}
-
-- (NSEnumerator *)keyEnumerator
-{
-    // enumerate over a copy because -objectForKey: mutates
-    // which could cause an exception in code that should
-    // appear to be correct
-    return [[_dict allKeys] objectEnumerator];
-}
-
-- (void)removeObjectForKey: (id)aKey
-{
-    [_dict removeObjectForKey: aKey];
-}
-
-- (void)setObject: (id)anObject forKey: (id)aKey
-{
-    [_dict setObject: [MAZeroingWeakRef refWithTarget: anObject]
-                                               forKey: aKey];
-}
-
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MAZeroingWeakProxy.h
--- a/Frameworks/MAZeroingWeakRef/Source/MAZeroingWeakProxy.h	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-//
-//  MAZeroingWeakProxy.h
-//  ZeroingWeakRef
-//
-//  Created by Michael Ash on 7/17/10.
-//  Copyright 2010 Michael Ash. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
- at class MAZeroingWeakRef;
-
- at interface MAZeroingWeakProxy : NSProxy
-{
-    MAZeroingWeakRef *_weakRef;
-    Class _targetClass;
-}
-
-+ (id)proxyWithTarget: (id)target;
-
-- (id)initWithTarget: (id)target;
-
-- (id)zeroingProxyTarget;
-
-#if NS_BLOCKS_AVAILABLE
-// same caveats/restrictions as MAZeroingWeakRef cleanup block
-- (void)setCleanupBlock: (void (^)(id target))block;
-#endif
-
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MAZeroingWeakProxy.m
--- a/Frameworks/MAZeroingWeakRef/Source/MAZeroingWeakProxy.m	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-//
-//  MAZeroingWeakProxy.m
-//  ZeroingWeakRef
-//
-//  Created by Michael Ash on 7/17/10.
-//  Copyright 2010 Michael Ash. All rights reserved.
-//
-
-#import "MAZeroingWeakProxy.h"
-
-#import "MAZeroingWeakRef.h"
-
- at implementation MAZeroingWeakProxy
-
-+ (id)proxyWithTarget: (id)target
-{
-    return [[[self alloc] initWithTarget: target] autorelease];
-}
-
-- (id)initWithTarget: (id)target
-{
-    // stash the class of the target so we can get method signatures after it goes away
-    _targetClass = [target class];
-    _weakRef = [[MAZeroingWeakRef alloc] initWithTarget: target];
-    return self;
-}
-
-- (void)dealloc
-{
-    [_weakRef release];
-    [super dealloc];
-}
-
-- (id)zeroingProxyTarget
-{
-    return [_weakRef target];
-}
-
-#if NS_BLOCKS_AVAILABLE
-- (void)setCleanupBlock: (void (^)(id target))block
-{
-    [_weakRef setCleanupBlock: block];
-}
-#endif
-
-- (id)forwardingTargetForSelector: (SEL)sel
-{
-    return [_weakRef target];
-}
-
-- (NSMethodSignature *)methodSignatureForSelector: (SEL)sel
-{
-    return [_targetClass instanceMethodSignatureForSelector: sel];
-}
-
-- (void)forwardInvocation: (NSInvocation *)inv
-{
-    NSMethodSignature *sig = [inv methodSignature];
-    NSUInteger returnLength = [sig methodReturnLength];
-    
-    if(returnLength)
-    {
-        char buf[returnLength];
-        bzero(buf, sizeof(buf));
-        [inv setReturnValue: buf];
-    }
-}
-
-- (BOOL)respondsToSelector: (SEL)sel
-{
-    id target = [_weakRef target];
-    if(target)
-        return [target respondsToSelector: sel];
-    else
-        return [_targetClass instancesRespondToSelector: sel];
-}
-
-- (BOOL)conformsToProtocol: (Protocol *)protocol
-{
-    id target = [_weakRef target];
-    if(target)
-        return [target conformsToProtocol: protocol];
-    else
-        return [_targetClass conformsToProtocol: protocol];
-}
-
-// NSProxy implements these for some incomprehensibly stupid reason
-
-- (NSUInteger)hash
-{
-    return [[_weakRef target] hash];
-}
-
-- (BOOL)isEqual: (id)obj
-{
-    return [[_weakRef target] isEqual: obj];
-}
-
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MAZeroingWeakRef.h
--- a/Frameworks/MAZeroingWeakRef/Source/MAZeroingWeakRef.h	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-//
-//  MAZeroingWeakRef.h
-//  ZeroingWeakRef
-//
-//  Created by Michael Ash on 7/5/10.
-//
-
-#import <Foundation/Foundation.h>
-
-
- at interface MAZeroingWeakRef : NSObject
-{
-    id _target;
-#if NS_BLOCKS_AVAILABLE
-    void (^_cleanupBlock)(id target);
-#endif
-}
-
-+ (BOOL)canRefCoreFoundationObjects;
-
-+ (id)refWithTarget: (id)target;
-
-- (id)initWithTarget: (id)target;
-
-#if NS_BLOCKS_AVAILABLE
-// ON 10.7:
-// cleanup block runs while the target's memory is still
-// allocated but after all dealloc methods have run
-// (it runs at associated object cleanup time)
-// you can use the target's pointer value but don't
-// manipulate its contents!
-
-// ON 10.6 AND BELOW:
-// cleanup block runs while the global ZWR lock is held
-// so make it short and sweet!
-// use GCD or something to schedule execution later
-// if you need to do something that may take a while
-//
-// it is unsafe to call -target on the weak ref from
-// inside the cleanup block, which is why the target
-// is passed in as a parameter
-// note that you must not resurrect the target at this point!
-- (void)setCleanupBlock: (void (^)(id target))block;
-#endif
-
-- (id)target;
-
- at end
diff -r 4a87584e9e3a -r 0170acde86c5 Frameworks/MAZeroingWeakRef/Source/MAZeroingWeakRef.m
--- a/Frameworks/MAZeroingWeakRef/Source/MAZeroingWeakRef.m	Sun Aug 21 16:37:35 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,695 +0,0 @@
-//
-//  MAZeroingWeakRef.m
-//  ZeroingWeakRef
-//
-//  Created by Michael Ash on 7/5/10.
-//
-
-#import "MAZeroingWeakRef.h"
-
-#import <dlfcn.h>
-#import <libkern/OSAtomic.h>
-#import <objc/runtime.h>
-#import <mach/mach.h>
-#import <mach/port.h>
-#import <pthread.h>
-
-
-/*
- The COREFOUNDATION_HACK_LEVEL macro allows you to control how much horrible CF
- hackery is enabled. The following levels are defined:
- 
- 3 - Completely insane hackery allows weak references to CF objects, deallocates
- them asynchronously in another thread to eliminate resurrection-related race
- condition and crash.
- 
- 2 - Full hackery allows weak references to CF objects by doing horrible
- things with the private CF class table. Extremely small risk of resurrection-
- related race condition leading to a crash.
- 
- 1 - Mild hackery allows foolproof identification of CF objects and will assert
- if trying to make a ZWR to one.
- 
- 0 - No hackery, checks for an "NSCF" prefix in the class name to identify CF
- objects and will assert if trying to make a ZWR to one
- */
-#ifndef COREFOUNDATION_HACK_LEVEL
-#define COREFOUNDATION_HACK_LEVEL 0
-#endif
-
-/*
- The KVO_HACK_LEVEL macro allows similar control over the amount of KVO hackery.
- 
- 1 - Use the private _isKVOA method to check for a KVO dynamic subclass.
- 
- 0 - No hackery, uses the KVO overridden -class to check.
- */
-#ifndef KVO_HACK_LEVEL
-#define KVO_HACK_LEVEL 1
-#endif
-
-#if KVO_HACK_LEVEL >= 1
- at interface NSObject (KVOPrivateMethod)
-
-- (BOOL)_isKVOA;
-
- at end
-#endif
-
-
- at interface MAZeroingWeakRef ()
-
-- (void)_zeroTarget;
-- (void)_executeCleanupBlockWithTarget: (id)target;
-
- at end
-
-
-static id (*objc_loadWeak_fptr)(id *location);
-static id (*objc_storeWeak_fptr)(id *location, id obj);
-
- at interface _MAZeroingWeakRefCleanupHelper : NSObject
-{
-    MAZeroingWeakRef *_ref;
-    id _target;
-}
-
-- (id)initWithRef: (MAZeroingWeakRef *)ref target: (id)target;
-
- at end
-
- at implementation _MAZeroingWeakRefCleanupHelper
-
-- (id)initWithRef: (MAZeroingWeakRef *)ref target: (id)target
-{
-    if((self = [self init]))
-    {
-        objc_storeWeak_fptr(&_ref, ref);
-        _target = target;
-    }
-    return self;
-}
-
-- (void)dealloc
-{
-    MAZeroingWeakRef *ref = objc_loadWeak_fptr(&_ref);
-    [ref _executeCleanupBlockWithTarget: _target];
-    objc_storeWeak_fptr(&_ref, nil);
-    
-    [super dealloc];
-}
-
- at end
-
-
- at implementation MAZeroingWeakRef
-
-#if COREFOUNDATION_HACK_LEVEL >= 2
-
-typedef struct __CFRuntimeClass {	// Version 0 struct
-    CFIndex version;
-    const char *className;
-    void (*init)(CFTypeRef cf);
-    CFTypeRef (*copy)(CFAllocatorRef allocator, CFTypeRef cf);
-    void (*finalize)(CFTypeRef cf);
-    Boolean (*equal)(CFTypeRef cf1, CFTypeRef cf2);
-    CFHashCode (*hash)(CFTypeRef cf);
-    CFStringRef (*copyFormattingDesc)(CFTypeRef cf, CFDictionaryRef formatOptions);	// str with retain
-    CFStringRef (*copyDebugDesc)(CFTypeRef cf);	// str with retain
-    void (*reclaim)(CFTypeRef cf);
-} CFRuntimeClass;
-
-extern CFRuntimeClass * _CFRuntimeGetClassWithTypeID(CFTypeID typeID);
-
-typedef void (*CFFinalizeFptr)(CFTypeRef);
-static CFFinalizeFptr *gCFOriginalFinalizes;
-static size_t gCFOriginalFinalizesSize;
-
-#endif
-
-#if COREFOUNDATION_HACK_LEVEL >= 1
-
-extern Class *__CFRuntimeObjCClassTable;
-
-#endif
-
-static pthread_mutex_t gMutex;
-
-static CFMutableDictionaryRef gObjectWeakRefsMap; // maps (non-retained) objects to CFMutableSetRefs containing weak refs
-
-static NSMutableSet *gCustomSubclasses;
-static NSMutableDictionary *gCustomSubclassMap; // maps regular classes to their custom subclasses
-
-#if COREFOUNDATION_HACK_LEVEL >= 3
-static CFMutableSetRef gCFWeakTargets;
-static NSOperationQueue *gCFDelayedDestructionQueue;
-#endif
-
-+ (void)initialize
-{
-    if(self == [MAZeroingWeakRef class])
-    {
-        pthread_mutexattr_t mutexattr;
-        pthread_mutexattr_init(&mutexattr);
-        pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE);
-        pthread_mutex_init(&gMutex, &mutexattr);
-        pthread_mutexattr_destroy(&mutexattr);
-        
-        gObjectWeakRefsMap = CFDictionaryCreateMutable(NULL, 0, NULL, &kCFTypeDictionaryValueCallBacks);
-        gCustomSubclasses = [[NSMutableSet alloc] init];
-        gCustomSubclassMap = [[NSMutableDictionary alloc] init];
-        
-        // see if the 10.7 ZWR runtime functions are available
-        // nothing special about objc_allocateClassPair, it just
-        // seems like a reasonable and safe choice for finding
-        // the runtime functions
-        Dl_info info;
-        int success = dladdr(objc_allocateClassPair, &info);
-        if(success)
-        {
-            // note: we leak the handle because it's inconsequential
-            // and technically, the fptrs would be invalid after a dlclose
-            void *handle = dlopen(info.dli_fname, RTLD_LAZY | RTLD_GLOBAL);
-            if(handle)
-            {
-                objc_loadWeak_fptr = dlsym(handle, "objc_loadWeak");
-                objc_storeWeak_fptr = dlsym(handle, "objc_storeWeak");
-                
-                // if either one failed, make sure both are zeroed out
-                // this is probably unnecessary, but good paranoia
-                if(!objc_loadWeak_fptr || !objc_storeWeak_fptr)
-                {
-                    objc_loadWeak_fptr = NULL;
-                    objc_storeWeak_fptr = NULL;
-                }
-            }
-        }
-        
-#if COREFOUNDATION_HACK_LEVEL >= 3
-        gCFWeakTargets = CFSetCreateMutable(NULL, 0, NULL);
-        gCFDelayedDestructionQueue = [[NSOperationQueue alloc] init];
-#endif
-    }
-}
-
-#define USE_BLOCKS_BASED_LOCKING 1
-#if USE_BLOCKS_BASED_LOCKING
-#define BLOCK_QUALIFIER __block
-static void WhileLocked(void (^block)(void))
-{
-    pthread_mutex_lock(&gMutex);
-    block();
-    pthread_mutex_unlock(&gMutex);
-}
-#define WhileLocked(block) WhileLocked(^block)
-#else
-#define BLOCK_QUALIFIER
-#define WhileLocked(block) do { \
-        pthread_mutex_lock(&gMutex); \
-        block \
-        pthread_mutex_unlock(&gMutex); \
-    } while(0)
-#endif
-
-static void AddWeakRefToObject(id obj, MAZeroingWeakRef *ref)
-{
-    CFMutableSetRef set = (void *)CFDictionaryGetValue(gObjectWeakRefsMap, obj);
-    if(!set)
-    {
-        set = CFSetCreateMutable(NULL, 0, NULL);
-        CFDictionarySetValue(gObjectWeakRefsMap, obj, set);
-        CFRelease(set);
-    }
-    CFSetAddValue(set, ref);
-}
-
-static void RemoveWeakRefFromObject(id obj, MAZeroingWeakRef *ref)
-{
-    CFMutableSetRef set = (void *)CFDictionaryGetValue(gObjectWeakRefsMap, obj);
-    CFSetRemoveValue(set, ref);
-}
-




More information about the commits mailing list