David Chisnall
6bf6ec959b
Made NSAllocateObject() and NSDeallocateObject() use / take id instead of NSObject*. This matches Apple's definition and gets rid of 'assignment / initialization from distinct Objective-C type' warnings when you use NSAllocateObject() to create an instance without an explicit cast.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29611 72102866-910b-0410-8b05-ffd578937521
2010-02-13 17:33:23 +00:00
Nicola Pero
071e91adab
Removed obsolete manual dependency rules in gnustep-base Makefile.postamble
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29563 72102866-910b-0410-8b05-ffd578937521
2010-02-11 22:40:35 +00:00
Nicola Pero
08d4ae4d8d
Preliminary fix for allowing to build libraries in parallel
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29553 72102866-910b-0410-8b05-ffd578937521
2010-02-11 17:50:01 +00:00
Riccardo Mottola
adecb6d9fe
Move declaration upwards to fix compile error
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29519 72102866-910b-0410-8b05-ffd578937521
2010-02-09 08:08:26 +00:00
Richard Frith-MacDonald
55d4f390aa
re-instate cleaned up version of string proxy code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29518 72102866-910b-0410-8b05-ffd578937521
2010-02-09 06:07:10 +00:00
Richard Frith-MacDonald
d280d6ba60
explicit initialise of handler
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29516 72102866-910b-0410-8b05-ffd578937521
2010-02-08 20:33:40 +00:00
Richard Frith-MacDonald
166ad33aa4
remove redundant line and improve comments
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29515 72102866-910b-0410-8b05-ffd578937521
2010-02-08 20:24:12 +00:00
Richard Frith-MacDonald
baf489409c
Farious fixes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29513 72102866-910b-0410-8b05-ffd578937521
2010-02-08 17:52:36 +00:00
Jonathan Gillaspie
afbeacef8b
Removed redundant call to _NSFoundationUncaughtExceptionHandler and added else blocks to allow a set uncaught exception handler to NOT exit if capable of recovering.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29511 72102866-910b-0410-8b05-ffd578937521
2010-02-08 17:15:57 +00:00
Richard Frith-MacDonald
6c84f23ae1
Coimplete operation queue implementation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29508 72102866-910b-0410-8b05-ffd578937521
2010-02-08 10:34:27 +00:00
Richard Frith-MacDonald
0dec7f1b97
NSOperationQueue additions
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29495 72102866-910b-0410-8b05-ffd578937521
2010-02-06 17:10:16 +00:00
Richard Frith-MacDonald
9f98d4c443
tweak for OSX compatibility
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29480 72102866-910b-0410-8b05-ffd578937521
2010-02-05 11:41:24 +00:00
Richard Frith-MacDonald
1a353d2514
don't try to cleanup on main thread exit
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29478 72102866-910b-0410-8b05-ffd578937521
2010-02-04 18:04:13 +00:00
Richard Frith-MacDonald
1c11dee837
implement and document NSOperation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29476 72102866-910b-0410-8b05-ffd578937521
2010-02-04 16:47:45 +00:00
Richard Frith-MacDonald
21e9e1231f
Corrected last commit
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29475 72102866-910b-0410-8b05-ffd578937521
2010-02-04 08:15:09 +00:00
Richard Frith-MacDonald
7f2d7d10eb
Fixup bad indentation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29473 72102866-910b-0410-8b05-ffd578937521
2010-02-03 22:13:48 +00:00
Jonathan Gillaspie
d85c001251
Fix several problems with lockWhenCondition:beforeDate:
...
First -- it needs to use timeIntervalSince1970 to be using the same reference date required for pthread_cond_timedwait
Second -- lockWhenCondition needs to loop because pthread_cond_timedwait can return prior to delay expiring (but with the wrong condition).
Third -- Internally the lock was incorrectly being unlocked on a delayed acquire (and YES return). And was incorrectly being unlocked a second time when the timeout expired.
Also, fixed a problem with tryLockWhenCondition:
By calling lockWhenCondition: it would incorrectly report a deadlock (rather than just return no) when we already have the lock.
All these changes are in line with expected and documented behavior for NSLock.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29472 72102866-910b-0410-8b05-ffd578937521
2010-02-03 21:15:03 +00:00
Richard Frith-MacDonald
367d552a3b
use usleep for small intervals
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29469 72102866-910b-0410-8b05-ffd578937521
2010-02-03 09:45:45 +00:00
Richard Frith-MacDonald
e9cdf2ec94
windows tweaks
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29468 72102866-910b-0410-8b05-ffd578937521
2010-02-03 09:31:59 +00:00
Richard Frith-MacDonald
a14a8a49b6
exit when main thread exits
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29462 72102866-910b-0410-8b05-ffd578937521
2010-02-02 14:25:58 +00:00
Richard Frith-MacDonald
b8ccc9459d
thread termination fixups
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29461 72102866-910b-0410-8b05-ffd578937521
2010-02-01 21:08:45 +00:00
Fred Kiefer
3f8bdadc33
Get root index from the binary property list data and use this to return the root object.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29449 72102866-910b-0410-8b05-ffd578937521
2010-01-30 12:47:50 +00:00
David Chisnall
e06564cf1b
Made NSString +constantStringClass return the constant string class, rather than whatever configure guessed the constant string class was.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29405 72102866-910b-0410-8b05-ffd578937521
2010-01-25 16:01:10 +00:00
Richard Frith-MacDonald
7f21dcbbea
windows tweak
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29397 72102866-910b-0410-8b05-ffd578937521
2010-01-25 09:58:52 +00:00
Richard Frith-MacDonald
a15a02db18
Quick hack to try to fix initialisation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29393 72102866-910b-0410-8b05-ffd578937521
2010-01-24 17:54:31 +00:00
Richard Frith-MacDonald
49a063af84
Reinstate working symbolic stack trace code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29392 72102866-910b-0410-8b05-ffd578937521
2010-01-24 17:13:03 +00:00
David Chisnall
c1ed4743d1
Fixed realloc() call.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29391 72102866-910b-0410-8b05-ffd578937521
2010-01-24 16:27:16 +00:00
Richard Frith-MacDonald
ec6e3d6f54
the -init method should return nil
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29381 72102866-910b-0410-8b05-ffd578937521
2010-01-24 06:53:49 +00:00
Richard Frith-MacDonald
b662140e16
Apply patch to switch completely to using pthreads
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29367 72102866-910b-0410-8b05-ffd578937521
2010-01-23 17:00:13 +00:00
Richard Frith-MacDonald
39d2ab833a
reorganise a little avoiding redundant system calls (setpgrp and ioctl TIOCNOTTY
...
are not needed if setsid is used).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29334 72102866-910b-0410-8b05-ffd578937521
2010-01-20 17:17:12 +00:00
Richard Frith-MacDonald
a4ad8f1b90
remove some duplicate code
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29329 72102866-910b-0410-8b05-ffd578937521
2010-01-20 12:03:37 +00:00
Richard Frith-MacDonald
62ca624e12
make sure we remove task from controlling terminal.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29327 72102866-910b-0410-8b05-ffd578937521
2010-01-20 10:27:08 +00:00
Quentin Mathe
4147368f90
Mac OS X compatibility tweaks for NSFormatter coding and copying.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29268 72102866-910b-0410-8b05-ffd578937521
2010-01-11 22:08:21 +00:00
Richard Frith-MacDonald
0cbf8db121
Add assertions to trap runtime error
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29263 72102866-910b-0410-8b05-ffd578937521
2010-01-11 13:54:32 +00:00
Richard Frith-MacDonald
e13a513f78
Tidied for consistency
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29262 72102866-910b-0410-8b05-ffd578937521
2010-01-11 12:49:18 +00:00
Richard Frith-MacDonald
b43991f8f6
fixups in changes made to avoid compiler warnings.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29261 72102866-910b-0410-8b05-ffd578937521
2010-01-11 12:38:37 +00:00
Richard Frith-MacDonald
93b94d87b2
Fix error in class for zombie
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29259 72102866-910b-0410-8b05-ffd578937521
2010-01-11 11:29:44 +00:00
Richard Frith-MacDonald
b1976d23bb
avoid compiler warnings
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29258 72102866-910b-0410-8b05-ffd578937521
2010-01-11 11:23:03 +00:00
Fred Kiefer
07b2bd4491
Set the concrete class, when this isn't already set. This was causing
...
compilation problems on gui with gcc 4.4
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29257 72102866-910b-0410-8b05-ffd578937521
2010-01-11 11:12:02 +00:00
Richard Frith-MacDonald
87b9234f30
fix typo
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29255 72102866-910b-0410-8b05-ffd578937521
2010-01-10 15:43:05 +00:00
Richard Frith-MacDonald
87c6d320c5
Tweaks for building with clang
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29254 72102866-910b-0410-8b05-ffd578937521
2010-01-10 14:38:16 +00:00
Richard Frith-MacDonald
83b5863735
tweak to avoid clang compilation failure
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29251 72102866-910b-0410-8b05-ffd578937521
2010-01-09 19:26:59 +00:00
Richard Frith-MacDonald
445ea4b5cb
OSX compatibility update for newline character set.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29249 72102866-910b-0410-8b05-ffd578937521
2010-01-09 07:45:18 +00:00
Richard Frith-MacDonald
1c4d02d09d
Fix for exception handling with libobjc2
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29247 72102866-910b-0410-8b05-ffd578937521
2010-01-09 07:24:05 +00:00
Eric Wasylishen
d4cee6fc57
Implement +[NSCharacterSet newlineCharacterSet]
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29219 72102866-910b-0410-8b05-ffd578937521
2010-01-05 22:28:12 +00:00
David Chisnall
c5103403f6
Refactored last two commits so that all of the real code is in GSIMap.h and is just called from the relevant classes, rather than copied and pasted everywhere. Also added fast enumeration support to GSCountedSet.
...
I think that's all of the classes that use GSIMaps for their implementation now fully supporting fast enumeration. If there are any that I've missed, then just copy the methods from GSSet to implement them. You just need to set the mutations pointer to something sensible (i.e. something that will change if the collection mutates) and then call the new GSIMapCountByEnumeratingWithStateObjectsCount() function.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29181 72102866-910b-0410-8b05-ffd578937521
2009-12-29 16:49:07 +00:00
David Chisnall
9e003700b4
Added fast enumeration support to GS[Mutable]Dictionary. This follows exactly the same pattern (and uses the same code as) GSSet. It's probably worth factoring out this code, because it is now used in four methods with almost no variation between them.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29180 72102866-910b-0410-8b05-ffd578937521
2009-12-29 16:21:01 +00:00
David Chisnall
41eb58f807
Added fast enumeration to NSSet. This changed the layout of GSMutableSet, adding a _version ivar, but this is a private class so it doesn't change the public ABI. All mutator methods in GSMutableSet must increment this variable, allowing thread-safe fast enumeration.
...
As with GSArray, GSSet uses its isa pointer for detecting mutations. This may change as a result of adding KVO notifications, so it might not be the best solution, but I can't currently think of a way we could catch isa changing to [GSMutableSet class] and not changing to a hidden class...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29179 72102866-910b-0410-8b05-ffd578937521
2009-12-29 15:59:14 +00:00
David Chisnall
34c77138fc
Added implementations of some of the new (10.6) NSArray methods that take blocks as arguments. These all use the new GSBlocks.h macros, so compile cleanly with GCC, but can be used by code compiled by clang.
...
Some of these implementations are not as efficient as they could be (especially the ones that take an NSIndexSet as the first argument). They also don't yet support concurrent enumeration. Apple implements these using Grand Central. We could possibly have a background thread that we send these things to (or use GCD if libdispatch is available). It's not worth spawning a new thread for them, except in exceptional circumstances (and, unfortunately, we can't easily tell how expensive a single iteration of a block is. Possibly we could time one block invocation, and if it's longer than some threshold make it concurrent, but it's probably not worth the effort).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29176 72102866-910b-0410-8b05-ffd578937521
2009-12-27 16:49:52 +00:00
David Chisnall
05f18160df
Added -enumerateObjectsUsingBlock: implementation to NSArray.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29174 72102866-910b-0410-8b05-ffd578937521
2009-12-27 15:25:12 +00:00