Decrease chance of ABI breakage.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32156 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-02-14 06:37:45 +00:00
parent 085798bb3a
commit 3d7125e2b0
38 changed files with 704 additions and 1027 deletions

View file

@ -1,3 +1,49 @@
2011-02-14 Richard Frith-Macdonald <rfm@gnu.org>
* Headers/Foundation/NSPortCoder.h:
* Headers/Foundation/NSCache.h:
* Headers/Foundation/NSSpellServer.h:
* Headers/Foundation/NSDecimalNumber.h:
* Headers/Foundation/NSBundle.h:
* Headers/Foundation/NSTimer.h:
* Headers/Foundation/NSScanner.h:
* Headers/Foundation/NSDistributedNotificationCenter.h:
* Headers/Foundation/NSComparisonPredicate.h:
* Headers/Foundation/NSUndoManager.h:
* Headers/Foundation/NSDateFormatter.h:
* Headers/Foundation/NSAutoreleasePool.h:
* Headers/Foundation/NSUserDefaults.h:
* Headers/Foundation/NSXMLNode.h:
* Headers/Foundation/NSThread.h:
* Headers/Foundation/NSHost.h:
* Headers/Foundation/NSRegularExpression.h:
* Headers/Foundation/NSKeyedArchiver.h:
* Headers/Foundation/NSProtocolChecker.h:
* Headers/Foundation/NSError.h:
* Headers/Foundation/NSPortMessage.h:
* Headers/Foundation/NSFileHandle.h:
* Headers/Foundation/NSDistributedLock.h:
* Headers/Foundation/NSPort.h:
* Headers/Foundation/NSSortDescriptor.h:
* Headers/Foundation/NSLocale.h:
* Headers/Foundation/NSTask.h:
* Headers/Foundation/NSArchiver.h:
* Headers/Foundation/NSInvocation.h:
* Headers/Foundation/NSFileManager.h:
* Headers/Foundation/NSNumberFormatter.h:
* Headers/Foundation/NSPortNameServer.h:
* Headers/Foundation/NSXMLParser.h:
* Headers/Foundation/NSIndexPath.h:
* Headers/Additions/GNUstepBase/GSMime.h:
* Headers/Additions/GNUstepBase/GSVersionMacros.h:
Make the presence of the pointer for reserved/private data clearer
and more explicit to try to ensure we actually remember to use it
to prevent ABI breakage.
* Source/NSNumberFormatter.m:
Modified to store new/extra ivars via the _reserved pointer so that
NSNumberFormatter can be safely subclassed by code outside the
library.
2011-02-13 Stefan Bidigaray <stefanbidi@gmail.com>
* Source/NSNumberFormatter.m: Moved 10.4+ functionality to a subclass.

View file

@ -75,7 +75,12 @@ extern "C" {
NSMutableDictionary *objects;
NSMutableDictionary *params;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
+ (NSString*) makeQuoted: (NSString*)v always: (BOOL)flag;
+ (NSString*) makeToken: (NSString*)t preservingCase: (BOOL)preserve;
@ -288,8 +293,8 @@ typedef enum {
@interface GSMimeSMTPClient : NSObject
{
#if GS_NONFRAGILE
# if defined(GS_GSMimeSMTPClient_IVARS)
@public GS_GSMimeSMTPClient_IVARS
# if defined(GSMimeSMTPClient_IVARS)
@public GSMimeSMTPClient_IVARS
# endif
#else
@private id _internal;

View file

@ -228,16 +228,6 @@
#define GS_EXPOSE(X) (!GS_NONFRAGILE || defined(EXPOSE_##X##_IVARS))
#ifdef GS_NONFRAGILE
# define GS_PADDING_IVAR
#else
# ifdef __clang__
# define GS_PADDING_IVAR __attribute__((unused)) void *gs_unused;
# else
# define GS_PADDING_IVAR void *gs_unused;
# endif
#endif
/* Static analyser macros: Provide annotations to help the analyser */
// TODO: Make this more sensible when GCC supports __attribute__((unused)) on
// ivars

View file

@ -70,7 +70,12 @@ extern "C" {
BOOL _encodingRoot;
BOOL _initialPass;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/* Initializing an archiver */
@ -176,7 +181,12 @@ extern "C" {
NSMutableDictionary *objDict; /* Class information store. */
NSMutableArray *objSave;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/* Initializing an unarchiver */

View file

@ -194,7 +194,12 @@ typedef struct autorelease_array_list
/* The method to add an object to this pool */
void (*_addImp)(id, SEL, id);
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -119,7 +119,12 @@ GS_EXPORT NSString* const NSLoadedClasses;
unsigned _version;
NSString *_frameworkVersion;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/** Return an array enumerating all the bundles in the application. This

View file

@ -61,7 +61,12 @@ extern "C" {
/** Total number of accesses to objects */
int64_t _totalAccesses;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**
* Returns the maximum number of objects that are supported by this cache.

View file

@ -77,7 +77,12 @@ typedef enum _NSPredicateOperatorType
NSUInteger _options;
NSPredicateOperatorType _type;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
@public
NSExpression *_left;
NSExpression *_right;

View file

@ -134,7 +134,12 @@ typedef NSUInteger NSDateFormatterBehavior;
NSDateFormatterStyle _dateStyle;
void *_formatter;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/* Initializing an NSDateFormatter */

View file

@ -129,7 +129,12 @@ extern "C" {
BOOL _raiseOnUnderflow;
BOOL _raiseOnDivideByZero;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -40,7 +40,12 @@ extern "C" {
NSString *_lockPath;
NSDate *_lockTime;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
+ (NSDistributedLock*) lockWithPath: (NSString*)aPath;

View file

@ -86,7 +86,12 @@ GS_EXPORT NSString* const GSNetworkNotificationCenterType;
id _remote; /* Proxy for center. */
BOOL _suspended; /* Is delivery suspended? */
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
+ (NSNotificationCenter*) defaultCenter;
+ (NSNotificationCenter*) notificationCenterForType: (NSString*)type;

View file

@ -121,7 +121,12 @@ GS_EXPORT NSString* const NSCocoaErrorDomain;
NSString *_domain;
NSDictionary *_userInfo;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -162,7 +162,12 @@ GS_EXPORT NSString * const NSFileHandleOperationException;
NSFileHandle *_readHandle;
NSFileHandle *_writeHandle;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
+ (id) pipe;
- (NSFileHandle*) fileHandleForReading;

View file

@ -203,7 +203,12 @@ typedef uint32_t OSType;
@private
NSString *_lastError;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
+ (NSFileManager*) defaultManager;
@ -387,7 +392,12 @@ typedef uint32_t OSType;
BOOL justContents: 1;
} _flags;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
- (NSDictionary*) directoryAttributes;
- (NSDictionary*) fileAttributes;

View file

@ -44,7 +44,12 @@ extern "C" {
NSSet *_names;
NSSet *_addresses;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -50,7 +50,12 @@ extern "C" {
NSUInteger _length;
NSUInteger *_indexes;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -50,7 +50,12 @@ extern "C" {
BOOL _sendToSuper;
void *_retptr;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/*

View file

@ -71,7 +71,12 @@ extern "C" {
NSMutableArray *_obj; /* Array of objects. */
NSPropertyListFormat _format;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**
@ -238,7 +243,12 @@ extern "C" {
#endif
NSZone *_zone; /* Zone for allocating objs. */
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -104,7 +104,12 @@ GS_EXPORT NSString * const NSISO8601Calendar;
NSString *_localeId;
NSMutableDictionary *_components;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)

View file

@ -137,10 +137,12 @@ typedef NSUInteger NSNumberFormatterRoundingMode;
NSString *_positiveFormat;
NSDictionary *_attributesForPositiveValues;
NSDictionary *_attributesForNegativeValues;
// 10.4 variable
@protected
NSUInteger _behavior;
#endif
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}

View file

@ -211,7 +211,12 @@ typedef SOCKET NSSocketNativeHandle;
NSMapTable *events;
#endif
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -94,7 +94,12 @@ extern "C" {
unsigned _version; /* Version of archiver used. */
NSZone *_zone; /* Zone for allocating objs. */
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -51,7 +51,12 @@ extern "C" {
NSPort *_send;
NSMutableArray *_components;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**
* OpenStep compatibility.

View file

@ -60,7 +60,12 @@ extern "C" {
NSMapTable *_portMap; /* Registered ports information. */
NSMapTable *_nameMap; /* Registered names information. */
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
+ (id) sharedInstance;
- (NSPort*) portForName: (NSString*)name

View file

@ -42,7 +42,12 @@ extern "C" {
Protocol *_myProtocol;
NSObject *_myTarget;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
// Creating a checker

View file

@ -34,10 +34,17 @@ DEFINE_BLOCK_TYPE(GSRegexBlock, void, NSTextCheckingResult*, NSMatchingFlags, BO
@interface NSRegularExpression : NSObject <NSCoding, NSCopying>
{
@private
GSREGEXTYPE *regex;
NSRegularExpressionOptions options;
GS_PADDING_IVAR;
#if GS_EXPOSE(NSRegularExpression)
@private
GSREGEXTYPE *regex;
NSRegularExpressionOptions options;
#endif
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
+ (NSRegularExpression*)regularExpressionWithPattern: (NSString*)aPattern
options: (NSRegularExpressionOptions)opts

View file

@ -50,7 +50,12 @@ extern "C" {
BOOL _caseSensitive;
BOOL _isUnicode;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/*

View file

@ -50,7 +50,12 @@ extern "C" {
BOOL _ascending;
SEL _selector;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/** Returns a flag indicating whether the sort descriptor sorts objects

View file

@ -64,7 +64,12 @@ GS_EXPORT NSString *const NSGrammarUserDescription;
NSString *_currentLanguage;
NSArray *_ignoredWords;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
// Checking in Your Service

View file

@ -54,7 +54,12 @@ extern "C" {
BOOL _hasCollected;
BOOL _hasNotified;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
+ (NSTask*) launchedTaskWithLaunchPath: (NSString*)path

View file

@ -72,7 +72,12 @@ extern "C" {
id _gcontext;
void *_runLoopInfo; // Per-thread runloop related info.
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -51,7 +51,12 @@ extern "C" {
SEL _selector;
id _info;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/* Creating timer objects. */

View file

@ -98,7 +98,12 @@ GS_EXPORT NSString* const NSUndoManagerWillUndoChangeNotification;
unsigned _disableCount;
unsigned _levelsOfUndo;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
- (void) beginUndoGrouping;

View file

@ -228,7 +228,12 @@ GS_EXPORT NSString* const GSLocale;
NSRecursiveLock *_lock;
NSDistributedLock *_fileLock;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -88,7 +88,12 @@ typedef NSUInteger NSXMLNodeKind;
NSUInteger _index;
id _objectValue;
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

View file

@ -74,7 +74,12 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain;
void *_parser; // GSXMLParser
void *_handler; // SAXHandler
#endif
GS_PADDING_IVAR;
#if !GS_NONFRAGILE
/* Pointer to private additional data used to avoid breaking ABI
* when we don't have the non-fragile ABI available.
*/
void *_reserved;
#endif
}
/**

File diff suppressed because it is too large Load diff