]> git.sesse.net Git - vlc/commitdiff
Be sure to declare NSInteger if it isn't present
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 27 Apr 2008 19:27:11 +0000 (21:27 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 27 Apr 2008 19:27:11 +0000 (21:27 +0200)
modules/gui/macosx/intf.h
modules/gui/macosx/simple_prefs.m

index e9ec5604e7e97f19e6c7e173b4d1b2419ede6356..c37ebb1e76510783af010afd52c3c84fd0ef7369 100644 (file)
 
 #include <Cocoa/Cocoa.h>
 
+/* 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.
  *****************************************************************************/
index 9dc89301f856f3fe40d3c4b4ee2eb697ef83f70c..720308e16499e0cbe009ea39d76a8aa4f2e641ff 100644 (file)
@@ -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];