libs-base/Source
theraven 19e71aa612 __weak is only allowed on ivars and globals, so we need to turn the Observation structure into a class.
Richard:

I've run the test suite with GC disabled on Linux/x86-64 and nothing broke, but can you please review these changes carefully anyway?

We seem to be using a complex custom allocator for a structure that is not allocated or deallocated.  In typical programs, it looks like we're actually just wasting memory by using the memory pool here.  Looking at the commit log, this hasn't really been touched for about 10 years, so possibly the assumptions are no longer valid.  I can only see this being useful if someone is adding and removing hundreds of notification observers every run loop iteration.  Do you have code that does this?  If not, then can I remove the custom allocator?



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33165 72102866-910b-0410-8b05-ffd578937521
2011-05-28 12:49:52 +00:00
..
Additions Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
ObjectiveC2 Remove spurious &s 2011-05-05 11:25:12 +00:00
unix GC fixup 2011-04-03 08:20:57 +00:00
win32 use errno.h for thread safety 2011-05-12 16:08:10 +00:00
.cvsignore
callframe.h a bit step towards removing obsolete mframe code. 2009-10-04 15:26:07 +00:00
callframe.m include malloc.h for alloc() on platforms where it isn't in alloca.h 2010-03-16 06:11:00 +00:00
cifframe.h simplify last change 2010-06-08 05:03:14 +00:00
cifframe.m fix includes for gcc-4.6 2011-05-19 08:19:24 +00:00
common.h Update for new runtime api 2011-02-20 08:32:54 +00:00
CompatibilityHeaders.make allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
CXXException.m Register C++ exception handler correctly for little endian platforms as well as big endian ones. 2011-03-16 14:38:42 +00:00
dld-load.h avoid compiler/linker warnings 2011-03-07 11:34:17 +00:00
DocMakefile simplify header layout 2011-03-13 12:52:37 +00:00
externs.m use the _() macro for localisation within base 2011-02-15 06:25:54 +00:00
GNUmakefile tweaks for OpenBSD 2011-04-03 09:54:57 +00:00
GSArray.m Fix keyed decoding for GSMutableArray and GSPlaceholderArray. 2011-05-12 08:24:15 +00:00
GSAttributedString.m casts to keep compiler happy 2011-03-29 09:40:14 +00:00
GSAvahiClient.h attempt to get avahi code working without breaking abi. 2010-07-13 12:13:31 +00:00
GSAvahiClient.m a few more static analyser tweaks 2011-03-09 12:40:50 +00:00
GSAvahiNetService.m a few more static analyser tweaks 2011-03-09 12:40:50 +00:00
GSAvahiNetServiceBrowser.m fix ivar errors and missing import 2010-07-13 11:21:46 +00:00
GSAvahiRunLoopIntegration.h Attempt to integrate Niels Grewe's avahi code 2010-07-13 10:35:13 +00:00
GSAvahiRunLoopIntegration.m Avahi bugfixes 2010-10-08 22:24:21 +00:00
GSBlocks.m add missing headers etc 2011-03-11 08:14:04 +00:00
GSConcreteValue.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
GSConcreteValueTemplate.m old/new objc api updates 2011-05-12 16:03:08 +00:00
GSCountedSet.m fix gc heade rlocation. 2011-02-27 17:53:14 +00:00
GSDictionary.m fix gc heade rlocation. 2011-02-27 17:53:14 +00:00
GSeq.h avoid compiler warnings 2011-02-28 19:49:57 +00:00
GSFastEnumeration.h Tidied up some compiler warnings in last commit. 2009-12-27 14:41:15 +00:00
GSFFCallInvocation.m fix includes for gcc-4.6 2011-05-19 08:19:24 +00:00
GSFFIInvocation.m fix includes for gcc-4.6 2011-05-19 08:19:24 +00:00
GSFileHandle.m use errno.h for thread safety 2011-05-12 16:08:10 +00:00
GSFormat.m add last night's changes based on static analyser results. 2011-03-09 10:24:18 +00:00
GSFTPURLHandle.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
GSHTTPAuthentication.m add last night's changes based on static analyser results. 2011-03-09 10:24:18 +00:00
GSHTTPURLHandle.m use errno.h for thread safety 2011-05-12 16:08:10 +00:00
GSICUString.h Recommit tested changes. 2011-02-11 14:31:25 +00:00
GSICUString.m Recommit tested changes. 2011-02-11 14:31:25 +00:00
GSInternal.h fix for non-fragile abi 2011-03-08 12:49:34 +00:00
GSInvocation.h rework memory management for ffi 2010-06-07 20:38:19 +00:00
GSLocale.m use the _() macro for localisation within base 2011-02-15 06:25:54 +00:00
GSMDNSNetServices.m more bsd tweaks 2011-03-07 15:34:06 +00:00
GSNetServices.h fix to compile on systems withut avahi 2011-03-01 18:14:21 +00:00
GSNetwork.h standardise listen backlog 2010-10-01 09:22:52 +00:00
GSNumberTypes.h Simplify the KVC getter code and make it return structs boxed in NSValues 2010-09-24 19:20:16 +00:00
GSPortPrivate.h generalize define from __MINGW32__ to __MINGW__ 2010-03-19 12:10:11 +00:00
GSPrivate.h Cleanup ... avoid accessing the 'isa' variable directly. 2011-02-20 16:21:43 +00:00
GSPThread.h Simplify source by usuing autoconf 2010-06-12 07:19:26 +00:00
GSRunLoopCtxt.h generalize define from __MINGW32__ to __MINGW__ 2010-03-19 12:10:11 +00:00
GSRunLoopWatcher.h Add some missing comments 2009-02-26 11:09:05 +00:00
GSRunLoopWatcher.m generalize define from __MINGW32__ to __MINGW__ 2010-03-19 12:10:11 +00:00
GSSet.m avoid compiler warnings 2011-02-28 19:49:57 +00:00
GSSocketStream.h Move NSStream addition declarations to separate file. 2010-03-05 12:41:40 +00:00
GSSocketStream.m add last night's changes based on static analyser results. 2011-03-09 10:24:18 +00:00
GSStream.h Move NSStream addition declarations to separate file. 2010-03-05 12:41:40 +00:00
GSStream.m generalize define from __MINGW32__ to __MINGW__ 2010-03-19 12:10:11 +00:00
GSString.m More GC fixes. Most notably, mark the thread object as not collectable, since it's hidden away in TLS where the GC can't find it. 2011-05-26 13:24:13 +00:00
GSURLPrivate.h * Source/GSURLPrivate.h: Addition of private method to NSURLProtocol 2009-04-18 14:22:54 +00:00
GSValue.m old/new objc api updates 2011-05-12 16:03:08 +00:00
hpux-load.h allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
inet_ntop.c remove unnecessary includeswq 2010-02-22 21:43:45 +00:00
inet_pton.c Guarded stdint.h inclusion 2010-05-21 11:05:33 +00:00
libgnustep-base-entry.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
Makefile.postamble make header dir 2011-03-13 14:33:42 +00:00
Makefile.preamble simplify header layout 2011-03-13 12:52:37 +00:00
NSAffineTransform.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSArchiver.m fix includes for gcc-4.6 2011-05-19 08:19:24 +00:00
NSArray.m OSX compat tweaks 2011-02-23 11:52:17 +00:00
NSAssertionHandler.m Expose 10.6-compatible interface for per-thread assertion handlers. 2010-11-07 15:37:19 +00:00
NSAttributedString.m add last night's changes based on static analyser results. 2011-03-09 10:24:18 +00:00
NSAutoreleasePool.m This one isn't really important, since this code path is only ever used in non-GC mode, but it keeps the static analyser happy. 2011-05-27 12:00:57 +00:00
NSBundle.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSCache.m Fix release of the wrong object in NSCache. 2011-02-11 12:42:59 +00:00
NSCachedURLResponse.m add last night's changes based on static analyser results. 2011-03-09 10:24:18 +00:00
NSCalendar.m OSX compat tweaks 2011-02-23 11:52:17 +00:00
NSCalendarDate.m fix am/pm issues and incorrect test 2011-03-16 13:17:48 +00:00
NSCallBacks.h allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
NSCallBacks.m minor cleanups 2011-02-19 19:42:42 +00:00
NSCharacterSet.m performance tweak 2010-09-24 11:05:11 +00:00
NSCharacterSetData.h OSX compatibility update for newline character set. 2010-01-09 07:45:18 +00:00
NSClassDescription.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSCoder.m fix includes for gcc-4.6 2011-05-19 08:19:24 +00:00
NSConcreteHashTable.m fix gc heade rlocation. 2011-02-27 17:53:14 +00:00
NSConcreteMapTable.m fix gc heade rlocation. 2011-02-27 17:53:14 +00:00
NSConcretePointerFunctions.h more gc fixups 2009-04-17 08:12:52 +00:00
NSConcretePointerFunctions.m minor cleanups 2011-02-19 19:42:42 +00:00
NSConnection.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSCopyObject.m Replace old code directly referencing class_pointer ivar with calls to the new runtime API treating objects as opaque pointers. 2011-02-20 12:28:12 +00:00
NSCountedSet.m fixups for libobjc2 2010-02-25 18:49:31 +00:00
NSData.m More tweaks for garbage collection mode, including making NSNotificationCenter use weak pointers (things are never removed if it uses strong pointers because they remove themselves in the -dealloc method, which is never called, and can't remove themselves in the -finalize method because the -finalize method would not be called until after they have been removed - this is consistent with Apple behaviour). 2011-05-25 11:15:08 +00:00
NSDate.m add last night's changes based on static analyser results. 2011-03-09 10:24:18 +00:00
NSDateFormatter.m fix for non-fragile abi 2011-03-08 12:49:34 +00:00
NSDebug.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSDecimal.m double comparison fixes 2011-02-26 06:29:57 +00:00
NSDecimalNumber.m double comparison fixes 2011-02-26 06:29:57 +00:00
NSDictionary.m OSX compat tweaks 2011-02-23 11:52:17 +00:00
NSDistantObject.m * Source/NSDistantObject.m: #ifdef to disable category 2010-09-09 22:18:01 +00:00
NSDistributedLock.m fixups for libobjc2 2010-02-25 18:49:31 +00:00
NSDistributedNotificationCenter.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSEnumerator.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSError.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSException.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSFileHandle.m use the _() macro for localisation within base 2011-02-15 06:25:54 +00:00
NSFileManager.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSFormatter.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSGarbageCollector.m Initial pass at implementing fully Apple-compatible GC. This requires the code to be built with -fobjc-gc or -fobjc-gc-only, and requires a runtime that implements all of the support functions (GNUstep runtime trunk or 1.5 when it's release). 2011-05-24 14:43:27 +00:00
NSGeometry.m more header reorganisation 2010-02-25 08:36:34 +00:00
NSHashTable.m Silence some warnings caused by returning the result of a method that doesn't return. 2011-02-11 14:51:47 +00:00
NSHost.m avoid compiler/linker warnings 2011-03-07 11:34:17 +00:00
NSHTTPCookie.m add last night's changes based on static analyser results. 2011-03-09 10:24:18 +00:00
NSHTTPCookieStorage.m fix includes to iumports 2010-03-10 14:53:51 +00:00
NSIndexPath.m zero self after dealloc if we are going to call another method. 2010-03-04 12:24:43 +00:00
NSIndexSet.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSInvocation.m add last night's changes based on static analyser results. 2011-03-09 10:24:18 +00:00
NSKeyedArchiver.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSKeyedUnarchiver.m old/new objc api updates 2011-05-12 16:03:08 +00:00
NSKeyValueCoding.m remove redundant code 2011-03-09 10:32:48 +00:00
NSKeyValueMutableArray.m Fix more unsigned int / int cases that should be NS[U]Integer 2010-09-16 02:55:24 +00:00
NSKeyValueMutableSet.m Fix more unsigned int / int cases that should be NS[U]Integer 2010-09-16 02:55:24 +00:00
NSKeyValueObserving.m Revert accidentally committed changes. 2011-05-27 09:18:57 +00:00
NSLocale.m Add a hack to reset formatter properties along with the formatter itself. This can't be the best way to go about this so feel free to provide input for a better solution. Also added 2 missing unlocks in NSLocale. 2011-03-12 14:22:21 +00:00
NSLock.m Simplify source by usuing autoconf 2010-06-12 07:19:26 +00:00
NSLog.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSMapTable.m Silence some warnings caused by returning the result of a method that doesn't return. 2011-02-11 14:51:47 +00:00
NSMessagePort.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSMessagePortNameServer.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSMethodSignature.m More tweaks for garbage collection mode, including making NSNotificationCenter use weak pointers (things are never removed if it uses strong pointers because they remove themselves in the -dealloc method, which is never called, and can't remove themselves in the -finalize method because the -finalize method would not be called until after they have been removed - this is consistent with Apple behaviour). 2011-05-25 11:15:08 +00:00
NSNetServices.m a few more static analyser tweaks 2011-03-09 12:40:50 +00:00
NSNotification.m fixups for libobjc2 2010-02-25 18:49:31 +00:00
NSNotificationCenter.m __weak is only allowed on ivars and globals, so we need to turn the Observation structure into a class. 2011-05-28 12:49:52 +00:00
NSNotificationQueue.m improve comments 2010-08-17 07:35:20 +00:00
NSNull.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSNumber.m fixup for signedness ... charValue always returns a signed char 2011-04-04 16:35:20 +00:00
NSNumberFormatter.m Cleanup/simplify for readability and fix bug copying new ivars 2011-05-02 09:02:02 +00:00
NSNumberMethods.h Simplify the KVC getter code and make it return structs boxed in NSValues 2010-09-24 19:20:16 +00:00
NSObjCRuntime.m fix includes for gcc-4.6 2011-05-19 08:19:24 +00:00
NSObject+NSComparisonMethods.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSObject.m Disable atomic ops detection for the time being. 2011-05-28 10:00:22 +00:00
NSOperation.m remove unused variables 2011-03-05 18:20:37 +00:00
NSPage.m update NSPage functions for windows 2010-06-17 19:08:08 +00:00
NSPathUtilities.m tweak 2011-04-13 14:34:39 +00:00
NSPipe.m generalize define from __MINGW32__ to __MINGW__ 2010-03-19 12:10:11 +00:00
NSPointerArray.m Use memmove rather than memcpy 2011-02-13 12:56:46 +00:00
NSPointerFunctions.m Silence some warnings caused by returning the result of a method that doesn't return. 2011-02-11 14:51:47 +00:00
NSPort.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSPortCoder.m fix includes for gcc-4.6 2011-05-19 08:19:24 +00:00
NSPortMessage.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSPortNameServer.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSPredicate.m fix use of preprocessor constants. 2010-11-18 09:46:51 +00:00
NSProcessInfo.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSPropertyList.m a few more static analyser tweaks 2011-03-09 12:40:50 +00:00
NSProtocolChecker.m Replace a call to -[Protocol name] with protocol_getName 2010-09-09 22:42:47 +00:00
NSProxy.m __objc_responds_to() -> class_respondsToSelector(). 2011-04-14 18:04:50 +00:00
NSRange.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSRegularExpression.m get closer to coding standards 2010-12-16 10:59:50 +00:00
NSRunLoop.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSScanner.m use init return value 2010-09-09 21:41:40 +00:00
NSSerializer.m casts to keep compiler happy 2011-03-29 09:40:14 +00:00
NSSet.m add block enumeration 2011-03-05 15:01:35 +00:00
NSSocketPort.m a few more static analyser tweaks 2011-03-09 12:40:50 +00:00
NSSocketPortNameServer.m a few more static analyser tweaks 2011-03-09 12:40:50 +00:00
NSSortDescriptor.m use cocoa values for the coding keys 2011-03-18 10:34:40 +00:00
NSSpellServer.m User defaults language/setup restructuring 2011-03-05 07:54:05 +00:00
NSString.m mingw tweak 2011-03-07 15:47:07 +00:00
NSTask.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSTextCheckingResult.m Added implementation of NSRegularExpression, from iOS 4 Foundation. 2010-11-19 22:06:18 +00:00
NSThread.m More GC fixes. Most notably, mark the thread object as not collectable, since it's hidden away in TLS where the GC can't find it. 2011-05-26 13:24:13 +00:00
NSTimer.m Make firing of timers more robust 2010-09-25 21:28:07 +00:00
NSTimeZone.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
nstzfile.h
NSUnarchiver.m fix includes for gcc-4.6 2011-05-19 08:19:24 +00:00
NSUndoManager.m use the _() macro for localisation within base 2011-02-15 06:25:54 +00:00
NSURL.m old/new objc api updates 2011-05-12 16:03:08 +00:00
NSURLAuthenticationChallenge.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSURLCache.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSURLConnection.m add delivery notification requests and fix memory leak. 2010-10-28 22:50:38 +00:00
NSURLCredential.m fixups for libobjc2 2010-02-25 18:49:31 +00:00
NSURLCredentialStorage.m fixups for libobjc2 2010-02-25 18:49:31 +00:00
NSURLDownload.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSURLHandle.m build additions with NO_GNUSTEP=1 2010-02-26 08:39:47 +00:00
NSURLProtectionSpace.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSURLProtocol.m Cleanup ... avoid accessing the 'isa' variable directly. 2011-02-20 16:21:43 +00:00
NSURLRequest.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSURLResponse.m OSX compat tweaks 2011-02-23 11:52:17 +00:00
NSUserDefaults.m Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode. 2011-05-27 11:48:44 +00:00
NSValue.m old/new objc api updates 2011-05-12 16:03:08 +00:00
NSValueTransformer.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSXMLDocument.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSXMLDTD.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSXMLDTDNode.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSXMLElement.m Simplify header inclusion 2010-02-19 08:12:46 +00:00
NSXMLNode.m Silence some warnings caused by returning the result of a method that doesn't return. 2011-02-11 14:51:47 +00:00
NSXMLParser.m tolerate missing/incorrect character encoding declarations 2011-05-09 11:35:00 +00:00
NSXMLPrivate.h merge back reorganisation branch 2010-02-14 10:48:10 +00:00
NSZone.m More GC fixes. Most notably, mark the thread object as not collectable, since it's hidden away in TLS where the GC can't find it. 2011-05-26 13:24:13 +00:00
null-load.h allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
objc-load.h Updated code to compile with GCC 4.6 and the new GNU Objective-C runtime 2010-12-23 02:23:05 +00:00
objc-load.m minor cleanups 2011-02-19 19:42:42 +00:00
preface.m Attempt to integrate Niels Grewe's avahi code 2010-07-13 10:35:13 +00:00
simple-load.h Use RTLD_NOLOAD, if it's supported. 2011-05-26 18:29:43 +00:00
win32-def.top allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
win32-load.h allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00