Skip to content

Commit

Permalink
Remove use of __weak, which XCode 7.3 disallows with manual ref counting
Browse files Browse the repository at this point in the history
  • Loading branch information
gnachman committed Jan 19, 2016
1 parent d88dc76 commit 8352898
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
11 changes: 1 addition & 10 deletions sources/GTMCarbonEvent.h
Expand Up @@ -230,16 +230,7 @@ GTM_EXTERN NSUInteger GTMCarbonToCocoaKeyModifiers(UInt32 inCarbonModifiers);
//
// Subclasses are expected to override the eventTarget and
// handleEvent:handler: methods to customize them.
@interface GTMCarbonEventHandler : NSObject {
@private
// handler we are wrapping
// lazily created in the eventHandler method
EventHandlerRef eventHandler_;
__weak id delegate_; // Our delegate
// Does our delegate respond to the gtm_eventHandler:receivedEvent:handler:
// selector? Cached for performance reasons.
BOOL delegateRespondsToHandleEvent_;
}
@interface GTMCarbonEventHandler : NSObject

// Registers the event handler to listen for |events|.
//
Expand Down
10 changes: 9 additions & 1 deletion sources/GTMCarbonEvent.m
Expand Up @@ -351,7 +351,15 @@ NSUInteger GTMCarbonToCocoaKeyModifiers(UInt32 inCarbonModifiers) {

const OSType kGTMCarbonFrameworkSignature = 'GTM ';

@implementation GTMCarbonEventHandler
@implementation GTMCarbonEventHandler {
// handler we are wrapping
// lazily created in the eventHandler method
EventHandlerRef eventHandler_;
id delegate_; // Our delegate (weak reference)
// Does our delegate respond to the gtm_eventHandler:receivedEvent:handler:
// selector? Cached for performance reasons.
BOOL delegateRespondsToHandleEvent_;
}

// Does our delegate respond to eventHandler:receivedEvent:handler:
//
Expand Down
2 changes: 1 addition & 1 deletion sources/ThreeFingerTapGestureRecognizer.m
Expand Up @@ -14,7 +14,7 @@ @implementation ThreeFingerTapGestureRecognizer {
int numTouches_;
NSTimeInterval firstTouchTime_; // Time since ref date of transition from 0 to >0 touches
NSTimeInterval threeTouchTime_; // Time since ref date of transition from <3 to 3 touches
__weak NSView *target_;
NSView *target_; // weak reference
SEL selector_;
BOOL fired_; // True if we just faked a three-finger click and future mouse clicks should be ignored.
}
Expand Down
2 changes: 1 addition & 1 deletion sources/iTermToolWrapper.h
Expand Up @@ -58,7 +58,7 @@
@interface iTermToolWrapper : NSView

@property(nonatomic, copy) NSString *name;
@property(nonatomic, readonly) __weak NSView *container;
@property(nonatomic, readonly) NSView *container;
@property(nonatomic, assign) id<ToolWrapperDelegate> delegate;
@property(nonatomic, readonly) id<ToolbeltTool> tool;
@property(nonatomic, readonly) CGFloat minimumHeight;
Expand Down
4 changes: 4 additions & 0 deletions sources/iTermToolWrapper.m
Expand Up @@ -32,6 +32,10 @@ - (iTermToolWrapper *)toolWrapper {

@end

@interface iTermToolWrapper()
@property(nonatomic, readwrite, assign) NSView *container;
@end

@implementation iTermToolWrapper {
NSTextField *_title;
NSButton *_closeButton;
Expand Down

0 comments on commit 8352898

Please sign in to comment.