Skip to content

Commit

Permalink
Merge branch 'rentzsch'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaltaks committed May 24, 2009
2 parents f4f1419 + f027c41 commit ebf042f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
19 changes: 18 additions & 1 deletion MATrackingArea/MATrackingArea.h
Expand Up @@ -66,7 +66,24 @@ typedef unsigned int MATrackingAreaOptions;
@private
NSRect _rect;
MATrackingAreaOptions _options;
__weak id _owner;
/*
Work-around: __weak breaks under ClickToFlash's specific environment:
* 10.5-or-later Base SDK (GC-aware)
* -fobjc-gc (GC supported but not required)
* 10.4 deployment target (MACOSX_DEPLOYMENT_TARGET=10.4)
The problem is 10.5 SDK + -fobjc-gc settings means function calls
such as _objc_assign_weak are emitted, but don't actually exist on
10.4. We die with an "Symbol not found" dyld error.
We work-around this by commenting-out __weak. In the general case
this is a too-broad work-around, but is fine for ClickToFlash's
specific case: we only use MATrackingArea when NSTrackingArea isn't
available. That means we only use MATrackingArea on 10.4, and 10.4
doesn't support GC anyways.
*/
/*__weak*/ id _owner;
NSDictionary * _userInfo;
NSPoint _lastMovedPoint;
BOOL _inside;
Expand Down
7 changes: 6 additions & 1 deletion SparkleManager.m
Expand Up @@ -71,7 +71,12 @@ - (SUUpdater*)_updater {
NSAssert(sparkleFramework, nil);

NSError *error = nil;
BOOL loaded = [sparkleFramework loadAndReturnError:&error];
BOOL loaded;
if ([sparkleFramework respondsToSelector:@selector(loadAndReturnError:)]) {
loaded = [sparkleFramework loadAndReturnError:&error];
} else {
loaded = [sparkleFramework load];
}
if (loaded) {
NSBundle *clickToFlashBundle = [NSBundle bundleWithIdentifier:@"com.github.rentzsch.clicktoflash"];
NSAssert(clickToFlashBundle, nil);
Expand Down

0 comments on commit ebf042f

Please sign in to comment.