Richard Frith-MacDonald
de6e9cf7fc
Literal string equality tests ... implement another optimisation, plus one
...
spotted by Fred, plus a fix for another bug spotted by Fred!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34102 72102866-910b-0410-8b05-ffd578937521
2011-11-01 11:43:40 +00:00
Richard Frith-MacDonald
307b4c2acb
improve literal string optimisation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34101 72102866-910b-0410-8b05-ffd578937521
2011-11-01 09:43:25 +00:00
Richard Frith-MacDonald
d8f925828c
fix bug spotted by fred
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34094 72102866-910b-0410-8b05-ffd578937521
2011-10-31 10:00:29 +00:00
Richard Frith-MacDonald
a59695c097
Implement optimisations suggested by Fred's vcachegrind profiling.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34093 72102866-910b-0410-8b05-ffd578937521
2011-10-31 08:12:26 +00:00
Fred Kiefer
daef7f6dc9
* Source/GSeq.h: Replace unsigned with NSUInteger.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34088 72102866-910b-0410-8b05-ffd578937521
2011-10-29 16:48:55 +00:00
Richard Frith-MacDonald
58389dd312
fix failure to terminate loop properly
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34085 72102866-910b-0410-8b05-ffd578937521
2011-10-28 18:17:36 +00:00
Richard Frith-MacDonald
d3a44df7f7
tweak for more efficient string handling
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34084 72102866-910b-0410-8b05-ffd578937521
2011-10-28 15:02:46 +00:00
Richard Frith-MacDonald
f42303afe6
clean up comments a little
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34083 72102866-910b-0410-8b05-ffd578937521
2011-10-28 14:31:46 +00:00
Richard Frith-MacDonald
8d78f200a2
tweak last optimisation
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34082 72102866-910b-0410-8b05-ffd578937521
2011-10-28 14:30:47 +00:00
Richard Frith-MacDonald
122d1d1b4e
fix error replacing strings in a string, and optimise literal strings a bit
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34081 72102866-910b-0410-8b05-ffd578937521
2011-10-28 14:25:17 +00:00
Richard Frith-MacDonald
5194c310bd
Tweaks to avoid compiler warnings
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34054 72102866-910b-0410-8b05-ffd578937521
2011-10-25 08:02:38 +00:00
Fred Kiefer
d3a9215d05
Imporve keyed decoding.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34049 72102866-910b-0410-8b05-ffd578937521
2011-10-24 14:33:30 +00:00
Fred Kiefer
eee46e56de
* Source/NSProcessInfo.m: Add includes needed for the HAVE_PROCFS
...
case.
* Source/common.h: Correct last commit, the #endif was placed
incorrectly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34041 72102866-910b-0410-8b05-ffd578937521
2011-10-22 13:59:05 +00:00
Richard Frith-MacDonald
ad461bf00b
another attempted workaround for __block issue
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34036 72102866-910b-0410-8b05-ffd578937521
2011-10-20 09:52:01 +00:00
Richard Frith-MacDonald
4d2b2b728e
clean up and comment last fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34033 72102866-910b-0410-8b05-ffd578937521
2011-10-20 07:09:57 +00:00
Richard Frith-MacDonald
709440ce98
quick hack for bug 34603
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34032 72102866-910b-0410-8b05-ffd578937521
2011-10-19 21:38:52 +00:00
Richard Frith-MacDonald
704a39c91b
fixes for gnutls detection and objc library detection
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34030 72102866-910b-0410-8b05-ffd578937521
2011-10-19 16:53:39 +00:00
Richard Frith-MacDonald
37f430d9d9
tidyup private api
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34029 72102866-910b-0410-8b05-ffd578937521
2011-10-19 15:25:38 +00:00
Richard Frith-MacDonald
9ff473fb71
fix for failure to load global defaults
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34026 72102866-910b-0410-8b05-ffd578937521
2011-10-19 13:32:50 +00:00
Richard Frith-MacDonald
871e8a2571
Hide user resources in .GNUstep for standalone packages
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34019 72102866-910b-0410-8b05-ffd578937521
2011-10-18 05:56:03 +00:00
Richard Frith-MacDonald
3569303331
documentation cleanups
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34015 72102866-910b-0410-8b05-ffd578937521
2011-10-17 10:59:02 +00:00
Quentin Mathe
32bdf04b26
Fixed NSXMLNode compilation when using the "pure" non-fragile ABI
...
(--disable-mixedabi was passed to Base configure).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34013 72102866-910b-0410-8b05-ffd578937521
2011-10-17 10:24:07 +00:00
Richard Frith-MacDonald
765e64da85
Allow bare "." as path name, but fix template to use "./"
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34012 72102866-910b-0410-8b05-ffd578937521
2011-10-17 09:10:18 +00:00
Fred Kiefer
e6a75007c0
* Source/NSString.m (-initWithCoder:): In keyed coding the key
...
"NS.bytes" may contain either an NSData or an NSString object.
Not sure about the encoding, I am using UTF8.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34010 72102866-910b-0410-8b05-ffd578937521
2011-10-17 08:28:38 +00:00
Richard Frith-MacDonald
0d966d357a
fix misssing line in last mod
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34007 72102866-910b-0410-8b05-ffd578937521
2011-10-15 18:42:16 +00:00
Richard Frith-MacDonald
ecaeb486d5
added Quentin's fix.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34006 72102866-910b-0410-8b05-ffd578937521
2011-10-15 18:41:24 +00:00
Richard Frith-MacDonald
e3588d2fc0
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34005 72102866-910b-0410-8b05-ffd578937521
2011-10-15 18:36:51 +00:00
Richard Frith-MacDonald
ef146334b0
fix copy/paste error
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34000 72102866-910b-0410-8b05-ffd578937521
2011-10-15 08:15:03 +00:00
Richard Frith-MacDonald
1d6c3a2a72
Portability tweaks
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33999 72102866-910b-0410-8b05-ffd578937521
2011-10-15 07:59:19 +00:00
Richard Frith-MacDonald
4cc58b721a
Use _POSIX_C_SOURCE=199506L
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33998 72102866-910b-0410-8b05-ffd578937521
2011-10-15 05:02:22 +00:00
Richard Frith-MacDonald
8f44e1d6f0
include errno for strerror
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33997 72102866-910b-0410-8b05-ffd578937521
2011-10-14 17:53:46 +00:00
Richard Frith-MacDonald
9bfdc923c7
add comment about clang __block workaround
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33996 72102866-910b-0410-8b05-ffd578937521
2011-10-14 16:54:33 +00:00
Richard Frith-MacDonald
341f74b871
threading portability improvement
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33995 72102866-910b-0410-8b05-ffd578937521
2011-10-14 16:43:03 +00:00
Richard Frith-MacDonald
0142bf0f8a
tweak minor problems in last changes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33994 72102866-910b-0410-8b05-ffd578937521
2011-10-14 16:19:37 +00:00
Richard Frith-MacDonald
eb8b275c1f
internal workaround for clang namespace pollution.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33993 72102866-910b-0410-8b05-ffd578937521
2011-10-14 15:46:13 +00:00
Richard Frith-MacDonald
c5301052a1
fix test for lossy conversions from unicode to other character sets.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33992 72102866-910b-0410-8b05-ffd578937521
2011-10-14 14:16:11 +00:00
Richard Frith-MacDonald
72dceeadc1
avloid namespace collisions for preprocessor constants
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33991 72102866-910b-0410-8b05-ffd578937521
2011-10-14 14:07:34 +00:00
Richard Frith-MacDonald
904fec80bd
imore informative logs
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33990 72102866-910b-0410-8b05-ffd578937521
2011-10-14 13:59:59 +00:00
Richard Frith-MacDonald
587f8f5666
fix buffer size error
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33989 72102866-910b-0410-8b05-ffd578937521
2011-10-14 13:48:13 +00:00
Richard Frith-MacDonald
a879c34f2d
tweak for fast conversion of literals to ascii or latin1
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33988 72102866-910b-0410-8b05-ffd578937521
2011-10-14 13:45:52 +00:00
Richard Frith-MacDonald
6a347fee68
tweak getting cString with specific encoding for unicode
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33987 72102866-910b-0410-8b05-ffd578937521
2011-10-14 13:19:43 +00:00
Richard Frith-MacDonald
0ceff0e920
fix typo
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33986 72102866-910b-0410-8b05-ffd578937521
2011-10-14 13:10:52 +00:00
Richard Frith-MacDonald
37f6b7aac6
define _XOPEN_SOURCE to 600 throughout
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33984 72102866-910b-0410-8b05-ffd578937521
2011-10-14 12:00:02 +00:00
Richard Frith-MacDonald
fbdcab1d55
solaris thread-saff errrno fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33983 72102866-910b-0410-8b05-ffd578937521
2011-10-14 11:40:34 +00:00
Richard Frith-MacDonald
9f68d90c98
fix initialisation bug
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33982 72102866-910b-0410-8b05-ffd578937521
2011-10-14 10:57:40 +00:00
Richard Frith-MacDonald
fcd8fefb9a
tweak
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33980 72102866-910b-0410-8b05-ffd578937521
2011-10-14 09:34:35 +00:00
Richard Frith-MacDonald
4dc9479f0f
implement -hash for constant strings
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33979 72102866-910b-0410-8b05-ffd578937521
2011-10-14 07:07:39 +00:00
Richard Frith-MacDonald
9e781c5714
tweak for reporting error code of connection failure
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33977 72102866-910b-0410-8b05-ffd578937521
2011-10-13 13:39:35 +00:00
Richard Frith-MacDonald
9b24a41871
build new private functions on win32
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33975 72102866-910b-0410-8b05-ffd578937521
2011-10-12 16:31:30 +00:00
Richard Frith-MacDonald
0282c8146e
windows compile fixes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33974 72102866-910b-0410-8b05-ffd578937521
2011-10-12 16:23:52 +00:00
Richard Frith-MacDonald
60c4fc3a63
Don't treat constnat string class as ascii
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33973 72102866-910b-0410-8b05-ffd578937521
2011-10-12 14:36:23 +00:00
Richard Frith-MacDonald
ee4d1aef0f
Tweaks to support UTF-8 literal string encoding supported by more recent
...
compilers.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33972 72102866-910b-0410-8b05-ffd578937521
2011-10-12 14:28:44 +00:00
Richard Frith-MacDonald
bd460841b4
Fix check for operation on nonblocking socket
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33967 72102866-910b-0410-8b05-ffd578937521
2011-10-11 21:43:00 +00:00
Richard Frith-MacDonald
fcfaac4931
minor string fixups
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33966 72102866-910b-0410-8b05-ffd578937521
2011-10-11 21:16:28 +00:00
Niels Grewe
857d32b33d
In -[GSMimeParser scanToken:] return @"" instead of nil when parsing an empty
...
quoted string.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33952 72102866-910b-0410-8b05-ffd578937521
2011-10-08 17:53:17 +00:00
Richard Frith-MacDonald
364fb1ec98
networking portability for for solaris
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33951 72102866-910b-0410-8b05-ffd578937521
2011-10-08 16:29:19 +00:00
Richard Frith-MacDonald
5021629c2b
small tweak for lowering resource usage during very heavy use of outgoing
...
connections.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33950 72102866-910b-0410-8b05-ffd578937521
2011-10-07 15:15:05 +00:00
Richard Frith-MacDonald
f7280475ff
fix to reture respnse for synchronous request.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33949 72102866-910b-0410-8b05-ffd578937521
2011-10-07 09:17:14 +00:00
Richard Frith-MacDonald
aae4782eb3
Make the use of nil for a file URL path raise an invalid argument exception
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33939 72102866-910b-0410-8b05-ffd578937521
2011-10-04 05:40:29 +00:00
Fred Kiefer
41298e5ec4
* Source/NSPropertyList.m (GSBinaryPLParser -objectAtIndex:):
...
Use long long for all integer types. Before we used signed types
which resulted wrong values for negative integers.
* Source/NSKeyedUnarchiver.m (-_decodeObject:): Handle the
string "$null" as nil all the times.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33934 72102866-910b-0410-8b05-ffd578937521
2011-10-03 19:48:30 +00:00
Richard Frith-MacDonald
afc6974925
Provisional IPv6 support added.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33933 72102866-910b-0410-8b05-ffd578937521
2011-10-03 16:03:19 +00:00
Fred Kiefer
2a419593ce
* Source/NSData.m (-initWithCoder:, -encodeWithCoder): Correct
...
keyed encoding/decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33932 72102866-910b-0410-8b05-ffd578937521
2011-10-03 13:22:16 +00:00
Richard Frith-MacDonald
cbf54ac301
Add a few OSX compatibility methods
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33929 72102866-910b-0410-8b05-ffd578937521
2011-10-02 11:17:49 +00:00
Niels Grewe
377a757e54
Started working on NSXMLNode.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33927 72102866-910b-0410-8b05-ffd578937521
2011-10-01 18:43:29 +00:00
Richard Frith-MacDonald
d8432fad48
Minor fixes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33916 72102866-910b-0410-8b05-ffd578937521
2011-09-30 20:31:15 +00:00
Eric Wasylishen
7d457ce4cc
* Source/NSUserDefaults.m:
...
- Refactoring of the code to read the system language list
into a separate function, systemLanguages().
- Add support for the LANGUAGE environment variable, a GNU extension.
It holds a colon-separated list of locales, and is intended to let
the user specify a list of their preferred languages in order.
For example, the language settings GUI in Ubuntu modifies the
LANGUAGE variable.
More info here:
http://www.gnu.org/software/gettext/manual/gettext.html#The-LANGUAGE-variable
- When populating NSLanguages, "expand" locales into a list of
related variants, formed by stripping off region suffixes. This
ensures that if a user's environment is set to a regional version
of a language (say CanadaFrench) but an application is only
traslated into French, the plain French translation will still be used.
e.g. if the system locales are {fr_CA, en_CA}, expand the list to
{fr_CA, fr, en_CA, en}.
* Headers/GNUstepBase/GSLocale.h:
* Source/GSLocale.m:
New functions GSLocaleVariants and GSLanguagesFromLocale
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33910 72102866-910b-0410-8b05-ffd578937521
2011-09-29 19:00:46 +00:00
Gregory John Casamento
f0c2282319
Shorten the error message here. Move the bulk of the explaination into README.initialize in the Documentation folder.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33909 72102866-910b-0410-8b05-ffd578937521
2011-09-29 17:04:13 +00:00
Richard Frith-MacDonald
9e8187eebf
Fixup to get correct type information when handling an incoming message as
...
suggested by Fred.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33832 72102866-910b-0410-8b05-ffd578937521
2011-09-12 16:03:07 +00:00
Richard Frith-MacDonald
4baaff38cb
Attempt workaround for runtime providing insufficient information in callback.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33814 72102866-910b-0410-8b05-ffd578937521
2011-09-07 09:42:50 +00:00
Richard Frith-MacDonald
fcf071b0b7
fix bug #34154
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33792 72102866-910b-0410-8b05-ffd578937521
2011-08-27 16:46:26 +00:00
Richard Frith-MacDonald
03c0773da1
build on apple
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33791 72102866-910b-0410-8b05-ffd578937521
2011-08-26 11:21:32 +00:00
Fred Kiefer
8da720fc7a
* Source/NSObject.m (__builtin_offsetof): Add workaround for build in missing
...
in old versions of gcc.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33774 72102866-910b-0410-8b05-ffd578937521
2011-08-22 11:02:10 +00:00
Fred Kiefer
80c8a7ff06
Temporary revert David's change to use PRIxPTR, PRIuPTR and
...
PRIdPTR. Old compilers don't handled these well. (That change
didn't have a ChangeLog entry)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33766 72102866-910b-0410-8b05-ffd578937521
2011-08-20 13:05:37 +00:00
Fred Kiefer
028ad4a59c
* Source/Additions/GSMime.m: Use specific IMP type for method
...
returning BOOL value.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33763 72102866-910b-0410-8b05-ffd578937521
2011-08-17 17:45:10 +00:00
David Chisnall
4cdea64975
Make -base compile almost without warnings again. Fixes:
...
- Using the correct format specifier
- Remove substringFromRange: (GNUstep extension) from NSString.h and use the non-deprecated version in -base.
- Delete definitions of methods that are the same in both a class and a category on that class (NSArray and NSObject).
Two files still have warnings:
- The GNUTLS stuff is using a load of deprecated APIs.
- xmlparse.m replaces a method using a category. This method seems to always return nil. Not sure what it's meant to do, or why it isn't a delegate of some kind.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33756 72102866-910b-0410-8b05-ffd578937521
2011-08-16 16:04:43 +00:00
David Chisnall
ca12a84e3f
Use the word-size-agnostic printf specifier.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33755 72102866-910b-0410-8b05-ffd578937521
2011-08-16 14:47:35 +00:00
Richard Frith-MacDonald
6dae192890
fix detection of excess data at end of multipart docs
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33738 72102866-910b-0410-8b05-ffd578937521
2011-08-15 08:59:52 +00:00
Richard Frith-MacDonald
1f86f92794
redo/correct last fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33736 72102866-910b-0410-8b05-ffd578937521
2011-08-15 06:16:51 +00:00
Richard Frith-MacDonald
2c508306bd
revert attepted bugfix ...needs more testing debugging
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33735 72102866-910b-0410-8b05-ffd578937521
2011-08-14 20:49:16 +00:00
Richard Frith-MacDonald
de099615e8
tweak parsing end of headers
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33734 72102866-910b-0410-8b05-ffd578937521
2011-08-14 18:38:13 +00:00
David Chisnall
bfd034b5b6
#ifdef -> #if
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33732 72102866-910b-0410-8b05-ffd578937521
2011-08-14 08:49:33 +00:00
David Chisnall
433554830d
Fix the build with the pure non-fragile ABI by declaring macros before using them.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33724 72102866-910b-0410-8b05-ffd578937521
2011-08-13 15:28:22 +00:00
Fred Kiefer
826db719cc
* Source/NSAffineTransform.m (-appendTransform:,
...
-prependTransform:): Fix bug in optimisation code by using a local variable.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33716 72102866-910b-0410-8b05-ffd578937521
2011-08-11 07:27:52 +00:00
David Chisnall
6cdbd621be
Replace the implementations of NSFastEnumeration in NSConcrete{Hash,Map}Table with ones that work and don't cause people to dereference pointers that are set to random integer values.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33713 72102866-910b-0410-8b05-ffd578937521
2011-08-09 08:43:54 +00:00
David Chisnall
8c89a86607
In -finalize, we're pretending to be the Objective-C runtime, so we need to
...
actually use isa directly, rather than the safe version. A better solution
would be to call object_dispose(), but this only works for objects created with
class_createInstance().
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33704 72102866-910b-0410-8b05-ffd578937521
2011-08-07 18:00:55 +00:00
David Chisnall
bb2e9d0627
When calling -.cxx_dealloc, look up the superclass before calling. This method
...
may destroy the receiver's class, if it's a user-generated one, so we can't
guarantee that it is valid after the call.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33701 72102866-910b-0410-8b05-ffd578937521
2011-08-07 16:56:58 +00:00
David Chisnall
2d364a86ca
Bracket the runtime.h include in a check.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33696 72102866-910b-0410-8b05-ffd578937521
2011-08-05 17:34:47 +00:00
David Chisnall
fa6f119996
Clean up NSRegularExpression, so that it compiles without warnings with or without ICU, but we don't pretend that we support things that we don't and silently return nonsense results to make debugging difficult for GNUstep users.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33688 72102866-910b-0410-8b05-ffd578937521
2011-08-03 12:04:27 +00:00
David Chisnall
682c9beb5b
Make base do unintuitive and stupid things in the name of Apple compatibility (hopefully Apple will fix their implementation in 10.7.something...).
...
Fix some tests.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33687 72102866-910b-0410-8b05-ffd578937521
2011-08-03 09:04:12 +00:00
Fred Kiefer
00c8832228
Remove some of the compiler warnings on system without clang or ICU.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33680 72102866-910b-0410-8b05-ffd578937521
2011-08-02 08:33:33 +00:00
David Chisnall
86edfd0c2b
Remove accidentally-committed log statements.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33669 72102866-910b-0410-8b05-ffd578937521
2011-08-01 10:48:07 +00:00
David Chisnall
dbe026608e
Ooops, should have been -> const id[].
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33667 72102866-910b-0410-8b05-ffd578937521
2011-07-31 18:37:12 +00:00
David Chisnall
8713e21d91
More ARC fixups: id* -> const id* in NSSet
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33666 72102866-910b-0410-8b05-ffd578937521
2011-07-31 18:34:40 +00:00
David Chisnall
b85364de7e
Cleanup:
...
- (void)release;
to
- (oneway void)release;
so everything implementing -release actually implements the one declared in the NSObject protocol.
Start marking things that are unavailable in ARC mode as unavailable in ARC mode.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33660 72102866-910b-0410-8b05-ffd578937521
2011-07-31 15:31:39 +00:00
David Chisnall
a124b3a52a
Fix the 64-bit bug that Fred spotted.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33649 72102866-910b-0410-8b05-ffd578937521
2011-07-27 08:46:31 +00:00
David Chisnall
48e1b94ef8
Change the order of the retain count and the padding, so the retain count is
...
always the word before isa.
Switch to using the correct kind of alignof (the ABI alignment in structures,
not the preferred alignment of the type - this stops us from allocating 4 bytes
of padding on x86-32 where there is no need for any)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33642 72102866-910b-0410-8b05-ffd578937521
2011-07-26 20:08:10 +00:00
David Chisnall
7698b8d176
64-bit fix in last commit.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33641 72102866-910b-0410-8b05-ffd578937521
2011-07-26 19:16:14 +00:00
David Chisnall
c0f08f202a
Use the small object support in libobjc2 trunk for 31 / 61-bit signed NSNumbers on 32 / 64-bit platforms respectively. Still to do: add an NSSmallFloat equivalent for 64-bit platforms, storing a float.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33639 72102866-910b-0410-8b05-ffd578937521
2011-07-26 19:05:43 +00:00
Quentin Mathe
9cb22639d9
Fixed missing oneway qualifier on -release return type.
...
Recent Clang trunk versions complain about it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33634 72102866-910b-0410-8b05-ffd578937521
2011-07-26 10:47:16 +00:00
Fred Kiefer
ae18c2fee0
* Source/NSJSONSerialization.m: Get this file to compile with
...
standard gcc settings fro GNUstep.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33633 72102866-910b-0410-8b05-ffd578937521
2011-07-25 20:30:39 +00:00
David Chisnall
c1cca9a336
Added NSJSONSerialization (10.7) implementation. The code path reading from an NSInputStream is not well tested - please try and break it!
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33631 72102866-910b-0410-8b05-ffd578937521
2011-07-25 15:50:51 +00:00
David Chisnall
d1ab6b2dba
Don't delete the global lock - we may still need it!
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33630 72102866-910b-0410-8b05-ffd578937521
2011-07-25 14:32:44 +00:00
David Chisnall
acd62d77ff
Removed debugging NSLog() that was accidentally committed.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33629 72102866-910b-0410-8b05-ffd578937521
2011-07-25 12:51:24 +00:00
David Chisnall
f65a7c5bda
Add some explicit casting where required in NSConcretePointerFunctions.h
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33626 72102866-910b-0410-8b05-ffd578937521
2011-07-24 22:12:59 +00:00
Fred Kiefer
254aa22792
Try to clean up after last commit.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33625 72102866-910b-0410-8b05-ffd578937521
2011-07-24 20:47:36 +00:00
David Chisnall
d2ea054c26
Lots of little fixes to make -base compile with -Werror (now builds without warnings).
...
Richard: I'm unsure about three of these, which were fixes in memset() calls in:
- NSConcreteMapTable.m
- NSConcreteHashTable.m
- Additions/NSData+GNUstepBase.m
Please can you check them? I think they are intended to zero the entire object
(rather than the first word), but the lack of comments makes me unsure.
Most changes were just tweaks to variable types. I've also removed some dead code from NSInvocation. This was small group of things that were marked for internal use only, but not actually referenced in the code anywhere.
Other improvements:
- NSArray / NSDictionary fixed up to use the 10.7 (ARC-friendly) prototypes.
- getObjects:andKeys: implemented for NSDictionary (10.5 method)
- NSPointerArray and NSHashTable now properly support weak objects.
- Tests for weak objects in collections.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33621 72102866-910b-0410-8b05-ffd578937521
2011-07-24 13:09:22 +00:00
David Chisnall
bc37adfb0c
Add support (and test) for weak keys and values in NSMapTable. This support should work in GC mode. It also works if the runtime supports ARC, even if the compiler does not use this support.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33617 72102866-910b-0410-8b05-ffd578937521
2011-07-23 16:16:01 +00:00
David Chisnall
40456f7787
Remove the zone pointer from objects. Now we always query the zones to find the relevant pointer. Zones are still supported, but we now optimise for the case where they are not used.
...
To disable zone support completely, NSAllocateObject() should ignore the zone and NSDeallocateObject() should skip the zone lookup.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33610 72102866-910b-0410-8b05-ffd578937521
2011-07-23 12:19:19 +00:00
David Chisnall
018fab87bd
Missing part of the NSArray update.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33609 72102866-910b-0410-8b05-ffd578937521
2011-07-23 12:02:04 +00:00
David Chisnall
d323a291d8
Change id* -> id[] for OS X 10.7 compatibility in NSArray. This change is required for ARC: now, id* means pointer to a single object, id[] means array.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33607 72102866-910b-0410-8b05-ffd578937521
2011-07-22 16:07:23 +00:00
David Chisnall
51446f39de
I give up. No brain left.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33605 72102866-910b-0410-8b05-ffd578937521
2011-07-22 13:37:38 +00:00
David Chisnall
df82f8b96c
Third try.
...
[NSException raise: GSNotEnoughCoffeeException];
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33604 72102866-910b-0410-8b05-ffd578937521
2011-07-22 13:34:08 +00:00
David Chisnall
eb32254242
Add missing #import.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33603 72102866-910b-0410-8b05-ffd578937521
2011-07-22 13:27:04 +00:00
David Chisnall
4b027a2106
Stub for NSRegularExpression when a compatible version of ICU is not present.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33602 72102866-910b-0410-8b05-ffd578937521
2011-07-22 13:23:11 +00:00
David Chisnall
d9fda65728
Added NSRegularExpressionSearch (10.7) support to NSString.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33600 72102866-910b-0410-8b05-ffd578937521
2011-07-21 13:17:27 +00:00
Eric Wasylishen
5c802d5d57
* Source/NSNumberFormatter.m
...
(-attributedStringForObjectValue:withDefaultAttributes:):
Guard against initializing an NSAttributedString with a nil string.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33596 72102866-910b-0410-8b05-ffd578937521
2011-07-21 01:43:07 +00:00
Eric Wasylishen
e626936660
* Source/GSAttributedString.m: Throw an exception if the string object
...
passed to -initWithString:attributes: doesn't respond to -length, or if
it is nil. This is the same behaviour as OS X.
* Source/NSAttributedString.m (-init): Call -initWithString:attributes:
with @"" instead of nil, since passing nil now causes an exception
to be thrown.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33595 72102866-910b-0410-8b05-ffd578937521
2011-07-21 01:23:08 +00:00
Richard Frith-MacDonald
12dee189f3
try to ensure that including objc/runtime.h always works to get the new API.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33583 72102866-910b-0410-8b05-ffd578937521
2011-07-19 09:38:51 +00:00
Richard Frith-MacDonald
4a5cb96bef
For the avoidance of confusion, remove references to obsolete header.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33562 72102866-910b-0410-8b05-ffd578937521
2011-07-15 13:53:45 +00:00
Richard Frith-MacDonald
44979bb7f4
fix faulty assert
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33560 72102866-910b-0410-8b05-ffd578937521
2011-07-15 13:46:51 +00:00
Richard Frith-MacDonald
497cb2af93
ssh handshake improvements and consmetic tweaks
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33535 72102866-910b-0410-8b05-ffd578937521
2011-07-12 11:40:15 +00:00
David Chisnall
a64f21744d
Do the things from the last commit in the correct order.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33523 72102866-910b-0410-8b05-ffd578937521
2011-07-11 15:12:47 +00:00
David Chisnall
6893ce1a95
Lazily initialize POSIX threads, matching OS X behaviour and stopping us from crashing when calling autorelease from a thread that was not previously registered explicitly (yuck!)
...
Also do some quite hacky (and not totally correct) things to try to make sure that we aren't confused into thinking that the first NSThread is the main thread, if it's created on a separate thread. Currently only supported on FreeBSD and OpenBSD.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33521 72102866-910b-0410-8b05-ffd578937521
2011-07-11 14:31:36 +00:00
David Chisnall
26b91d9bcd
[NSNumber -init] should not destroy itself when called as [super init]. This behaviour was breaking anything that subclassed NSNumber in user code (e.g. PyObjC).
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33517 72102866-910b-0410-8b05-ffd578937521
2011-07-11 12:36:04 +00:00
Fred Kiefer
866c1dfcb4
* Source/GSLocale.m (GSLanguageFromLocale): Handle local "C.UTF-8"
...
correctly. Needed for Cygwin.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33516 72102866-910b-0410-8b05-ffd578937521
2011-07-11 11:55:35 +00:00
Fred Kiefer
9c39943894
Support the OpenSuse key TIMEZONE in /etc/sysconfig/clock.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33512 72102866-910b-0410-8b05-ffd578937521
2011-07-11 09:35:54 +00:00
Wolfgang Lux
f9f1f879f4
Override NSObject +zone to ensure that -zone returns a valid zone
...
pointer when it is called on a class object.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33498 72102866-910b-0410-8b05-ffd578937521
2011-07-10 14:48:26 +00:00
David Chisnall
6bf1350874
Silence type errors by declaring the correct superclass of GSPlaceholderString.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33481 72102866-910b-0410-8b05-ffd578937521
2011-07-07 12:32:59 +00:00
David Chisnall
540e690dc5
Don't DESTROY() the placeholder string - that doesn't destroy it (since it overrides -release to do nothing), it just makes it unreachable.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33480 72102866-910b-0410-8b05-ffd578937521
2011-07-07 12:32:05 +00:00
David Chisnall
99141c2dc1
Fix a memory leak that valgrind spotted.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33479 72102866-910b-0410-8b05-ffd578937521
2011-07-07 12:30:10 +00:00
David Chisnall
0618607b3a
Use -retainCount instead of NSExtraRefCount() in gs_weak_load() so we can support objects that define a custom retain / release mechanism in weak variables.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33478 72102866-910b-0410-8b05-ffd578937521
2011-07-07 12:29:54 +00:00
David Chisnall
35f66911a8
Fix typo NS -> GS. We don't actually want NSAllocateObject to call NSAllocateObject...
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33458 72102866-910b-0410-8b05-ffd578937521
2011-07-04 21:23:26 +00:00
David Chisnall
2a2d7339d1
Switch the order of the reference count and the zone so that the reference count (in reference counted mode) is always immediately in front of the object. Please test this!!
...
Opt NSObject into the fast path for ARC. ARC will now not call the retain / release / autorelease methods on NSObject or any classes that inherit their implementation of these methods from NSObject. In quick and dirty testing, this gives about a 10-20% speedup.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33446 72102866-910b-0410-8b05-ffd578937521
2011-07-04 11:31:28 +00:00
David Chisnall
38566d1888
Don't call c++ constructors when allocating a class with class_createInstance() - this function calls them itself, and calling them twice is a bad idea.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33436 72102866-910b-0410-8b05-ffd578937521
2011-07-03 11:04:04 +00:00
David Chisnall
56a002dae7
Rewrote NSProxy's -retain / -release to be the same as NSObject, not its own ad-hoc thing.
...
Added declaration of __bridge for use in non-ARC mode.
Tweaked arrayWithObjects:count: to take a const id* parameter, to avoid ARC
treating it as a write-back parameter.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33425 72102866-910b-0410-8b05-ffd578937521
2011-06-30 14:44:58 +00:00
David Chisnall
46b12a71e8
Add support to NSObject for automatically zeroing __weak references when using ARC.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33408 72102866-910b-0410-8b05-ffd578937521
2011-06-29 13:13:15 +00:00
David Chisnall
3f83dabfaa
Small tweaks to NSGarbageCollector.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33402 72102866-910b-0410-8b05-ffd578937521
2011-06-29 11:46:45 +00:00
Richard Frith-MacDonald
4a29a86319
move comment to be before the method it applies to
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33380 72102866-910b-0410-8b05-ffd578937521
2011-06-26 10:27:52 +00:00
Wolfgang Lux
5f044ea3ee
Fix implementation of NSString -getParagraphStart 🔚 contentsEnd:forRange:.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33379 72102866-910b-0410-8b05-ffd578937521
2011-06-26 10:03:10 +00:00
Fred Kiefer
dbd9d19e8f
Add a few 10.6 NSURL methods to NSBundle.
...
Based on patch by julian.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33367 72102866-910b-0410-8b05-ffd578937521
2011-06-22 23:01:01 +00:00
Richard Frith-MacDonald
2457b82569
locking fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33356 72102866-910b-0410-8b05-ffd578937521
2011-06-20 07:47:47 +00:00
Richard Frith-MacDonald
e84d049078
Add some flexibility
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33355 72102866-910b-0410-8b05-ffd578937521
2011-06-20 07:33:27 +00:00
Richard Frith-MacDonald
c5c5f18075
fix a couple of leak detection bugs
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33353 72102866-910b-0410-8b05-ffd578937521
2011-06-20 04:37:20 +00:00
Richard Frith-MacDonald
523366101e
more leak cleanup stuff
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33349 72102866-910b-0410-8b05-ffd578937521
2011-06-19 13:34:17 +00:00
Richard Frith-MacDonald
9831216043
Start stuff for handling cleanup on process exit.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33344 72102866-910b-0410-8b05-ffd578937521
2011-06-19 09:26:03 +00:00
Richard Frith-MacDonald
db2099074d
fix uninitialised variable
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33342 72102866-910b-0410-8b05-ffd578937521
2011-06-18 18:11:57 +00:00
Richard Frith-MacDonald
1a7e135434
fix possibly uninitialised variable
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33341 72102866-910b-0410-8b05-ffd578937521
2011-06-18 17:47:37 +00:00
Richard Frith-MacDonald
6707dd35ad
Patches by Sebastian Reitenbach
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33338 72102866-910b-0410-8b05-ffd578937521
2011-06-18 12:57:30 +00:00
Richard Frith-MacDonald
c1d5647bb6
10.6 sompatibility (some)
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33337 72102866-910b-0410-8b05-ffd578937521
2011-06-18 07:09:28 +00:00
Richard Frith-MacDonald
9212d01480
Fix xml parse error
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33327 72102866-910b-0410-8b05-ffd578937521
2011-06-17 13:47:24 +00:00
Richard Frith-MacDonald
3ea06f1379
Add some requests 10.6 methods ... untested.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33326 72102866-910b-0410-8b05-ffd578937521
2011-06-17 11:45:28 +00:00
Fred Kiefer
a70202a9b8
Make Avahi work with gcc 2.95.
...
Patch by Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33291 72102866-910b-0410-8b05-ffd578937521
2011-06-13 14:50:25 +00:00
Fred Kiefer
549d78e403
Add rest of Sebastian's patch.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33280 72102866-910b-0410-8b05-ffd578937521
2011-06-11 15:32:37 +00:00
Fred Kiefer
9a4d790ca8
* Source\NSCalendar.m: Protect the name id.
...
Patch by Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33276 72102866-910b-0410-8b05-ffd578937521
2011-06-11 10:44:38 +00:00
Richard Frith-MacDonald
c058c30391
Add configure option to control gdomap port
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33264 72102866-910b-0410-8b05-ffd578937521
2011-06-09 17:08:41 +00:00
Richard Frith-MacDonald
7e505e6a0f
remove observer on dealloc
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33257 72102866-910b-0410-8b05-ffd578937521
2011-06-07 18:34:39 +00:00
Fred Kiefer
586d1786f9
Add [NSURL -checkResourceIsReachableAndReturnError:].
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33245 72102866-910b-0410-8b05-ffd578937521
2011-06-04 15:08:37 +00:00
Richard Frith-MacDonald
8ccabb5ee6
apply Wolfgangs fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33238 72102866-910b-0410-8b05-ffd578937521
2011-06-03 06:02:18 +00:00
Riccardo Mottola
3c2c5dee35
Disable use of tzname on OpenBSD too
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33229 72102866-910b-0410-8b05-ffd578937521
2011-06-02 07:45:41 +00:00
Richard Frith-MacDonald
635bd46437
another system specific tweak
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33228 72102866-910b-0410-8b05-ffd578937521
2011-06-02 06:54:23 +00:00
Richard Frith-MacDonald
1d8d141af9
fix typo
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33227 72102866-910b-0410-8b05-ffd578937521
2011-06-01 22:12:21 +00:00
Richard Frith-MacDonald
d522034e22
More attempts to work around system specific timezone inconsistencies
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33226 72102866-910b-0410-8b05-ffd578937521
2011-06-01 22:04:46 +00:00
Richard Frith-MacDonald
30faeb91f9
minor tweak to fallback
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33222 72102866-910b-0410-8b05-ffd578937521
2011-06-01 15:15:52 +00:00
Richard Frith-MacDonald
277fd71b21
fix boundary
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33219 72102866-910b-0410-8b05-ffd578937521
2011-06-01 11:44:48 +00:00
Niels Grewe
c480a0ce35
Adjust callback prototypes to use NSUInteger instead of unsigned int.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33214 72102866-910b-0410-8b05-ffd578937521
2011-05-31 14:19:26 +00:00
Richard Frith-MacDonald
a69b7c2466
always create autorelease pools for mixed GC mode support
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33212 72102866-910b-0410-8b05-ffd578937521
2011-05-31 07:55:06 +00:00
Richard Frith-MacDonald
ba24ce0841
minor map/hash table compatibility tweaks and simplify notification center
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33210 72102866-910b-0410-8b05-ffd578937521
2011-05-31 06:46:17 +00:00
David Chisnall
75402211f2
Add a couple of __strong annotations to pointers. Any non-id pointer that can
...
store GC'd memory must be __strong. Currently, this annotation is largely
ignored, because the runtime is a lot more lax about what may store pointers
than Apple's, but this will be tightened up in the future.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33205 72102866-910b-0410-8b05-ffd578937521
2011-05-30 11:40:26 +00:00
David Chisnall
7f4aaf781b
(Hopefully) fix the build with GS_WITH_GC.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33185 72102866-910b-0410-8b05-ffd578937521
2011-05-28 22:35:57 +00:00
Fred Kiefer
a3cdc403cb
Remove compiler warnings.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33184 72102866-910b-0410-8b05-ffd578937521
2011-05-28 20:27:20 +00:00
David Chisnall
f8ea008b1b
Make NSPointerArray insert the correct read / write barriers in GC mode.
...
Add some helper functions to NSConcretePointerFunctions.h that make it easier
to do this in the other collections that need to support GC.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33180 72102866-910b-0410-8b05-ffd578937521
2011-05-28 18:05:29 +00:00
Eric Wasylishen
f2a470d893
tweak and re-enable atomic ops detection
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33179 72102866-910b-0410-8b05-ffd578937521
2011-05-28 18:05:14 +00:00
David Chisnall
6a4d9fd5ae
Fix a few functions that I missed for hybrid mode.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33178 72102866-910b-0410-8b05-ffd578937521
2011-05-28 15:28:24 +00:00
David Chisnall
93218b86ba
Make CFRetain() / CFRelease() behaviour dependent on GC mode.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33177 72102866-910b-0410-8b05-ffd578937521
2011-05-28 15:15:05 +00:00
David Chisnall
4db587f9d6
First pass at hybrid GC mode. This will try use retain-release mode if the collector is not running. Code will run in retain/release mode unless something compiled with -fobjc-gc-only is loaded.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33174 72102866-910b-0410-8b05-ffd578937521
2011-05-28 14:51:40 +00:00
Fred Kiefer
86fa2414ec
* Source/NSString.m (-initWithFormat:locale:): Make sure va_end()
...
gets called.
Patch by Stefan Bidigaray <stefanbidi@gmail.com>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33172 72102866-910b-0410-8b05-ffd578937521
2011-05-28 13:32:29 +00:00
David Chisnall
f7368f492b
Make NSGarbageCollector return nil when compiled in GC mode but run in non-GC mode.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33170 72102866-910b-0410-8b05-ffd578937521
2011-05-28 13:13:42 +00:00
David Chisnall
0a6a7216ac
Accidentally left some non-GC code enabled in GC mode.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33169 72102866-910b-0410-8b05-ffd578937521
2011-05-28 13:09:57 +00:00
David Chisnall
50e06b7cca
__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
Niels Grewe
2c301fb937
Disable atomic ops detection for the time being.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33163 72102866-910b-0410-8b05-ffd578937521
2011-05-28 10:00:22 +00:00
David Chisnall
68f1581eb9
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.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33145 72102866-910b-0410-8b05-ffd578937521
2011-05-27 12:00:57 +00:00
David Chisnall
7764740bdc
Make -drain and -release in NSAutoreleasePool do the same thing (rather than one calling the other) in non-GC mode.
...
Replace all -release messages sent to autorelease pools with -drain. In non-GC mode, these are equivalent. In GC mode, these trigger a collection.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33143 72102866-910b-0410-8b05-ffd578937521
2011-05-27 11:48:44 +00:00
Richard Frith-MacDonald
29063b6928
minor tweaks for atomic inc/dec support
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33142 72102866-910b-0410-8b05-ffd578937521
2011-05-27 10:05:25 +00:00
David Chisnall
417418ef8e
Revert accidentally committed changes.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33140 72102866-910b-0410-8b05-ffd578937521
2011-05-27 09:18:57 +00:00
Niels Grewe
410ab087fa
Attempt to detect the flags needed to enable compiler intrinsics for atomic
...
operations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33134 72102866-910b-0410-8b05-ffd578937521
2011-05-26 18:37:58 +00:00
David Chisnall
928551c80a
Use RTLD_NOLOAD, if it's supported.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33131 72102866-910b-0410-8b05-ffd578937521
2011-05-26 18:29:43 +00:00
David Chisnall
de2fd8df6e
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.
...
GC now works well enough for LanguageKit to run.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33123 72102866-910b-0410-8b05-ffd578937521
2011-05-26 13:24:13 +00:00
Richard Frith-MacDonald
8da9a5ecbb
Another attempt to improve atomic inc/dec
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33119 72102866-910b-0410-8b05-ffd578937521
2011-05-25 22:18:39 +00:00
Richard Frith-MacDonald
ac2b43669d
Tweak atomic inc/dec code
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33116 72102866-910b-0410-8b05-ffd578937521
2011-05-25 16:47:11 +00:00
Richard Frith-MacDonald
eb39994378
partial revert
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33115 72102866-910b-0410-8b05-ffd578937521
2011-05-25 15:53:17 +00:00
David Chisnall
b08b2d0f34
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).
...
Gorm now works correctly when built with GC enabled.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33109 72102866-910b-0410-8b05-ffd578937521
2011-05-25 11:15:08 +00:00
Richard Frith-MacDonald
a439972605
attempt multithreading bugfix
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33107 72102866-910b-0410-8b05-ffd578937521
2011-05-25 09:20:42 +00:00
David Chisnall
6068e9484c
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).
...
Currently, there are a few places where we should be calling NSAllocateCollectable() without NSScannedOption, but are actually calling NSZoneMalloc() unless we're in GC mode. We should not need separate code paths for this anywhere outside NSZone, since NSAllocateCollectable() will work in non-GC mode as well.
A few of the changes should be tweaked slightly so that they do run-time tests. For example, when compiling with -fobjc-gc, we may be linked against non-GC code, which will use -retain and -release but won't use the memory barriers. Supporting this nicely is a lot of effort, and I'm not fully convinced it's a good idea.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33104 72102866-910b-0410-8b05-ffd578937521
2011-05-24 14:43:27 +00:00
Richard Frith-MacDonald
e32626abe7
try to cope better with apps which leak autorelease pools.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33099 72102866-910b-0410-8b05-ffd578937521
2011-05-24 10:52:25 +00:00
Richard Frith-MacDonald
afc2ef7de8
fix main bundle path
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33088 72102866-910b-0410-8b05-ffd578937521
2011-05-23 10:51:58 +00:00
Richard Frith-MacDonald
55cd4ef60b
quoted-printable fixes
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33082 72102866-910b-0410-8b05-ffd578937521
2011-05-22 06:22:05 +00:00
Richard Frith-MacDonald
8c89a47a8b
fix includes for gcc-4.6
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33069 72102866-910b-0410-8b05-ffd578937521
2011-05-19 08:19:24 +00:00
Richard Frith-MacDonald
ae8059e5c1
use errno.h for thread safety
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33028 72102866-910b-0410-8b05-ffd578937521
2011-05-12 16:08:10 +00:00
Richard Frith-MacDonald
b2649e0526
old/new objc api updates
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33027 72102866-910b-0410-8b05-ffd578937521
2011-05-12 16:03:08 +00:00
Fred Kiefer
ac3f2c5095
Fix keyed decoding for GSMutableArray and GSPlaceholderArray.
...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33026 72102866-910b-0410-8b05-ffd578937521
2011-05-12 08:24:15 +00:00