From c30432e5f1d0fff1471c8abfddff28eac6facae0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Sun, 27 Apr 2008 21:27:11 +0200 Subject: [PATCH] Be sure to declare NSInteger if it isn't present --- modules/gui/macosx/intf.h | 6 ++++++ modules/gui/macosx/simple_prefs.m | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/gui/macosx/intf.h b/modules/gui/macosx/intf.h index e9ec5604e7..c37ebb1e76 100644 --- a/modules/gui/macosx/intf.h +++ b/modules/gui/macosx/intf.h @@ -37,6 +37,12 @@ #include +/* this was introduced in Darwin 9. We need to declare it to prevent both + * compilation warnings and errors */ +#ifndef NSInteger +#define NSInteger int +#endif + /***************************************************************************** * Local prototypes. *****************************************************************************/ diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m index 9dc89301f8..720308e164 100644 --- a/modules/gui/macosx/simple_prefs.m +++ b/modules/gui/macosx/simple_prefs.m @@ -431,7 +431,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil; [o_video_device_pop addItemWithTitle: [NSString stringWithFormat: @"%@ %i (%ix%i)", _NS("Screen"), i+1, (int)s_rect.size.width, (int)s_rect.size.height]]; - [[o_video_device_pop lastItem] setTag: [[[NSScreen screens] objectAtIndex: i] displayID]]; + [[o_video_device_pop lastItem] setTag: (int)[[[NSScreen screens] objectAtIndex: i] displayID]]; i++; } [o_video_device_pop selectItemAtIndex: 0]; @@ -1146,12 +1146,12 @@ static VLCSimplePrefs *_o_sharedInstance = nil; [self showSettingsForCategory: o_hotkeys_view]; } -- (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView +- (int)numberOfRowsInTableView:(NSTableView *)aTableView { return [o_hotkeySettings count]; } -- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex +- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex { if( [[aTableColumn identifier] isEqualToString: @"action"] ) return [o_hotkeyDescriptions objectAtIndex: rowIndex]; -- 2.39.2