Start using NSInteger and NSUInteger
These have been introduced in Leopard and default to int and unsigned int. In 64-bit Snow Leopard they are long and unsigned long. This caused issues with the getRectsBeingDrawn message which needs a pointer to a NSInteger (long on 64-bit!) but we passed in an integer. Surprisingly this problem was visible when compiling with -O0 (segfault), but *not* when compiling with -O1. Other messages were NSInteger is now needed have also been adapted. Since NSInteger and NSUInteger are not available on Tiger, a define has been added to add typedefs for these when they have not been defined by the system headers.
This commit is contained in:
@ -25,6 +25,14 @@
|
||||
#import <gdk/quartz/GdkQuartzView.h>
|
||||
#import <gdk/quartz/GdkQuartzWindow.h>
|
||||
|
||||
/* NSInteger only exists in Leopard and newer. This check has to be
|
||||
* done after inclusion of the system headers. If NSInteger has not
|
||||
* been defined, we know for sure that we are on 32-bit.
|
||||
*/
|
||||
#ifndef NSINTEGER_DEFINED
|
||||
typedef int NSInteger;
|
||||
typedef unsigned int NSUInteger;
|
||||
#endif
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user