Commit graph

6095 commits

Author SHA1 Message Date
rfm
6b8dc7ef6c 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
fredkiefer
bc796f4304 * 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
rfm
6efa3c983e 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
thebeing
a8bcdd81c1 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
rfm
223eb3356c 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
ericwa
6352d91406 * 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
gcasa
eebba60c4b 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
rfm
6094a0cfa6 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
rfm
6cd7e3a588 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
rfm
b7b4333de4 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
rfm
f4e03baeea 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
fredkiefer
dff5311a0b * 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
fredkiefer
9e7246aa24 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
fredkiefer
c3d229f716 * 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
theraven
5568644a5e 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
theraven
5d60193f9c 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
rfm
bc7be959e5 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
rfm
8c2da63941 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
rfm
5b054c22e1 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
rfm
4e5360267c 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
theraven
209d75627d #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
theraven
157da23407 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
fredkiefer
67702ed4dd * 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
theraven
11817ed00a 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
theraven
68f58ffe56 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
theraven
8d699f6ff8 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
theraven
1330e3cbfc 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
theraven
f72d31cd68 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
theraven
a04ed1a9ff 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
fredkiefer
dafc3301e5 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
theraven
999a0cb544 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
theraven
1aaba6c0d5 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
theraven
e2c5fe29fe 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
theraven
f77f9b1f35 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
theraven
bc62c44b2b 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
theraven
1d7274697b 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
theraven
9c03fb74fb 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
theraven
206a427809 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
qmathe
c9e3c58f06 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
fredkiefer
e8ee222d6d * 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
theraven
1d43e6de35 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
theraven
ce32c10f45 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
theraven
6af87a82cd 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
theraven
4eb0fe5390 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
fredkiefer
da112a776b 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
theraven
ceba92a265 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
theraven
fc206e3169 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
theraven
863fff32b7 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
theraven
9dbeddeeae 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
theraven
b5b216f2be 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