Skip to content

Commit 7df307b

Browse files
committed
Use NSInteger/NSUInteger where appropiate
These return values now match the type specified by Apple.
1 parent 87faec2 commit 7df307b

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Mac/PythonLauncher/FileSettings.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ - (id)initForFileType: (NSString *)filetype
9797

9898
- (id)initForFSDefaultFileType: (NSString *)filetype
9999
{
100-
int i;
100+
NSUInteger i;
101101
NSString *filename;
102102
NSDictionary *dict;
103103
static NSDictionary *factorySettings;

Mac/PythonLauncher/MyAppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ - (void)testFileTypeBinding
6161
NSURL *appUrl;
6262
static NSString *extensions[] = { @"py", @"pyw", @"pyc", NULL};
6363
NSString **ext_p;
64-
int i;
64+
NSInteger i;
6565

6666
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"SkipFileBindingTest"])
6767
return;

Mac/PythonLauncher/PreferencesWindowController.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030

3131
- (void)controlTextDidChange:(NSNotification *)aNotification;
3232

33-
- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString;
34-
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index;
35-
- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox;
36-
33+
- (NSUInteger)comboBox:(NSComboBox *)aComboBox
34+
indexOfItemWithStringValue:(NSString *)aString;
35+
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index;
36+
- (NSUInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox;
3737

3838
@end

Mac/PythonLauncher/PreferencesWindowController.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,24 @@ - (void)controlTextDidChange:(NSNotification *)aNotification
9393
};
9494

9595
// NSComboBoxDataSource protocol
96-
- (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString
96+
- (NSUInteger)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString
9797
{
9898
NSArray *interp_list = [settings interpreters];
99-
unsigned int rv = [interp_list indexOfObjectIdenticalTo: aString];
99+
NSUInteger rv = [interp_list indexOfObjectIdenticalTo: aString];
100100
return rv;
101101
}
102102

103-
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index
103+
- (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)index
104104
{
105105
NSArray *interp_list = [settings interpreters];
106106
id rv = [interp_list objectAtIndex: index];
107107
return rv;
108108
}
109109

110-
- (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox
110+
- (NSUInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox
111111
{
112112
NSArray *interp_list = [settings interpreters];
113-
int rv = [interp_list count];
113+
NSUInteger rv = [interp_list count];
114114
return rv;
115115
}
116116

0 commit comments

Comments
 (0)