[vlc-devel] commit: Be sure to declare NSInteger if it isn't present ( Felix Paul Kühne )

git version control git at videolan.org
Sun Apr 27 21:26:08 CEST 2008


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Apr 27 21:27:11 2008 +0200| [c30432e5f1d0fff1471c8abfddff28eac6facae0]

Be sure to declare NSInteger if it isn't present

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c30432e5f1d0fff1471c8abfddff28eac6facae0
---

 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 e9ec560..c37ebb1 100644
--- a/modules/gui/macosx/intf.h
+++ b/modules/gui/macosx/intf.h
@@ -37,6 +37,12 @@
 
 #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.
  *****************************************************************************/
diff --git a/modules/gui/macosx/simple_prefs.m b/modules/gui/macosx/simple_prefs.m
index 9dc8930..720308e 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];




More information about the vlc-devel mailing list