git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32465 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2011-03-05 18:12:55 +00:00
parent 328152bfbc
commit d12e49f2c9
39 changed files with 90 additions and 72 deletions

View file

@ -1,3 +1,45 @@
2011-03-05 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSInternal.h:
* Source/NSDateFormatter.m:
* Source/NSNumberFormatter.m:
* 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:
Tweaks for running in a garbage collecting environment.
2011-03-05 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSBundle.m: AbsolutePathOfExecutable() attempt to fix this

View file

@ -82,7 +82,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
+ (NSString*) makeQuoted: (NSString*)v always: (BOOL)flag;

View file

@ -77,7 +77,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
@ -191,7 +191,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -201,7 +201,7 @@ typedef struct autorelease_array_list
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -126,7 +126,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -68,7 +68,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
/**

View file

@ -84,7 +84,7 @@ typedef enum _NSPredicateOperatorType
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
@public
NSExpression *_left;

View file

@ -139,7 +139,7 @@ GS_NSDateFormatter_IVARS;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -136,7 +136,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -47,7 +47,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -93,7 +93,7 @@ GS_EXPORT NSString* const GSNetworkNotificationCenterType;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
+ (NSNotificationCenter*) defaultCenter;

View file

@ -128,7 +128,7 @@ GS_EXPORT NSString* const NSCocoaErrorDomain;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -169,7 +169,7 @@ GS_EXPORT NSString * const NSFileHandleOperationException;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
+ (id) pipe;

View file

@ -210,7 +210,7 @@ typedef uint32_t OSType;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
@ -408,7 +408,7 @@ typedef uint32_t OSType;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
- (NSDictionary*) directoryAttributes;

View file

@ -51,7 +51,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -57,7 +57,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -57,7 +57,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -78,7 +78,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
@ -253,7 +253,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -111,7 +111,7 @@ GS_EXPORT NSString * const NSISO8601Calendar;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -149,7 +149,7 @@ GS_NSNumberFormatter_IVARS;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -218,7 +218,7 @@ typedef SOCKET NSSocketNativeHandle;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -101,7 +101,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -58,7 +58,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
/**

View file

@ -67,7 +67,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
+ (id) sharedInstance;

View file

@ -49,7 +49,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -46,7 +46,7 @@ DEFINE_BLOCK_TYPE(GSRegexBlock, void, NSTextCheckingResult*, NSMatchingFlags, BO
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}
+ (NSRegularExpression*)regularExpressionWithPattern: (NSString*)aPattern

View file

@ -57,7 +57,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -57,7 +57,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -71,7 +71,7 @@ GS_EXPORT NSString *const NSGrammarUserDescription;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -61,7 +61,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -79,7 +79,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -58,7 +58,7 @@ extern "C" {
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -105,7 +105,7 @@ GS_EXPORT NSString* const NSUndoManagerWillUndoChangeNotification;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -235,7 +235,7 @@ GS_EXPORT NSString* const GSLocale;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -95,7 +95,7 @@ typedef NSUInteger NSXMLNodeKind;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -81,7 +81,7 @@ GS_EXPORT NSString* const NSXMLParserErrorDomain;
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
*/
@private void *_internal GS_UNUSED_IVAR;
@private id _internal GS_UNUSED_IVAR;
#endif
}

View file

@ -35,17 +35,20 @@
* @public GS_X_IVARS;
* # endif
* #else
* @private void *_internal GS_UNUSED_IVAR;
* @private id _internal GS_UNUSED_IVAR;
* #endif
*
* In the non fragile case, this means that the public header has nothing
* visible, but the ivars defined in GS_X_IVARS are visible within the
* implementation.
*
* In the fragile case, the '_internal' pinter is visible in the public
* header, but as an opaque private instance variable, while macros from
* this file allow the actual memory to be accessed either as a malloc'ed
* structure or as a private class.
* In the fragile case, the '_internal' instance variable is visible in the
* public header, but as an opaque private instance variable, while macros
* from this file allow the actual memory to be accessed either as a private
* class. The use of a private class rather than simple heap memory is
* necessary for garbage collection... the runtime is able to ensure that
* garbage collection works properly for the instance variables in the
* private class.
*
* Before including the header file containing the public class declaration,
* you must define GS_X_IVARS (where X is the class name) to be the
@ -72,32 +75,8 @@
#if !GS_NONFRAGILE
/* Code for when we don't have non-fragile instance variables
* The presence of GS_INTERNAL_STRUCT means that the instance variables are
* accessible as a struct rather than as a class.
*/
#if defined(GS_INTERNAL_STRUCT)
/* Start declaration of internal ivars.
*/
#define GS_PRIVATE_INTERNAL(name) \
typedef struct name ## InternalStruct \
{ \
GS_##name##_IVARS; \
} name ## Internal;
/* Create holder for internal ivars.
*/
#define GS_CREATE_INTERNAL(name) \
_internal = (void*)NSZoneCalloc([self zone], 1, sizeof(name ## Internal));
/* Destroy holder for internal ivars.
*/
#define GS_DESTROY_INTERNAL(name) \
if (_internal != 0) { NSZoneFree([self zone], _internal); _internal = 0; }
#else /* GS_INTERNAL_STRUCT */
/* Start declaration of internal ivars.
*/
#define GS_PRIVATE_INTERNAL(name) \
@ -113,14 +92,13 @@ GS_##name##_IVARS; \
/* Create holder for internal ivars.
*/
#define GS_CREATE_INTERNAL(name) \
_internal = (void*)[name ## Internal new];
_internal = [name ## Internal new];
/* Destroy holder for internal ivars.
*/
#define GS_DESTROY_INTERNAL(name) \
if (_internal != 0) {[(id)_internal release]; _internal = 0; }
if (nil != _internal) {[_internal release]; _internal = nil; }
#endif /* GS_INTERNAL_STRUCT */
#undef internal
#define internal ((GSInternal*)_internal)

View file

@ -89,7 +89,6 @@ NSToUDateFormatStyle (NSDateFormatterStyle style)
void *_formatter
#define GSInternal NSDateFormatterInternal
#define GS_INTERNAL_STRUCT 1
#include "GSInternal.h"
GS_PRIVATE_INTERNAL(NSDateFormatter)

View file

@ -207,7 +207,6 @@ ICUToNSRoundingMode (UNumberFormatRoundingMode mode)
void *_formatter
#define GSInternal NSNumberFormatterInternal
#define GS_INTERNAL_STRUCT 1
#include "GSInternal.h"
GS_PRIVATE_INTERNAL(NSNumberFormatter)