The GNUstep Base Library is a library of general-purpose, non-graphical Objective C objects.
Find a file
theraven e486341176 Rewritten NSNumber implementation. This fixes several OS X-compatibility issues:
The -pointerValue method now returns the value cast to a pointer, not some random value, as the documentation says it should.  This is a change from OpenStep, which said:

> It's an error to send this message to an NSValue that doesn't store a pointer.

The OS X docs now say:

> The receiver's value as a pointer to void. If the receiver was not created to hold a pointer-sized data item, the result is undefined.

This means that any NSNumber created with a word-sized integer should return the same value.

Fixed a number of corner-cases in the compare: implementation caused by incorrect type promotion.  The OS X docs say:

> The compare: method follows the standard C rules for type conversion.

The OS X implementation does not do this.  We now match Apple's conversion rules bug-for-bug: Every value is stored in the smallest signed type that will hold it, unless there is no unsigned type that can hold it, in which case it is stored in an `unsigned long long`, comparisons between integer and floating point values cast both to a double, comparisons between integer types perform a real comparison (so an unsigned long long is always greater than any negative number, at any precision).  The Apple implementation is actually quite sane, it is just completely unrelated to the documentation in any way.

We now use the same range of reusable objects.  Note that there is an error in Cocoa Design Patterns in the description of how Apple's implementation works.  Do not use this as a reference.

We now return `nil` when an NSNumber is sent an -init message.  This is consistent with Apple's implementation but breaks some things in the GNUstep test suite (which RFM said he will fix).

There is a small change in NSValue.h so that the locale parameter is now an `id` not an `NSString*`.  This is because, under recent OS X, it may also be an `NSLocale` instance.  I am not sure how much GNUstep supports `NSLocale`, but this change shouldn't affect anything.

The new (private) GSNumberTypes.h file lets you define macros that are instantiated with each of the names of primitive C types.  These might be useful for simplifying other classes that have -intValue, -floatValue, and so on methods, such as the `NSCell` family.

The old NSConcreteNumberTemplate and NSConcreteNumber stuff has been removed.  The code is now a bit more than 10% of the size of the old NSNumber code, and is hopefully maintainable now, so the next change won't require a complete rewrite.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29618 72102866-910b-0410-8b05-ffd578937521
2010-02-14 12:57:44 +00:00
config merge back reorganisation branch 2010-02-14 10:48:10 +00:00
Documentation merge back reorganisation branch 2010-02-14 10:48:10 +00:00
Examples Do not try including GNUmakefile.local - completely obsolete 2010-02-11 18:05:16 +00:00
Headers Rewritten NSNumber implementation. This fixes several OS X-compatibility issues: 2010-02-14 12:57:44 +00:00
macosx allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
NSCharacterSets OSX compatibility update for newline character set. 2010-01-09 07:45:18 +00:00
NSTimeZones Do not try including GNUmakefile.local - completely obsolete 2010-02-11 18:05:16 +00:00
Resources Do not try including GNUmakefile.local - completely obsolete 2010-02-11 18:05:16 +00:00
Source Rewritten NSNumber implementation. This fixes several OS X-compatibility issues: 2010-02-14 12:57:44 +00:00
SSL Do not try including GNUmakefile.local - completely obsolete 2010-02-11 18:05:16 +00:00
Tools merge back reorganisation branch 2010-02-14 10:48:10 +00:00
.cvsignore Ignore autom4te.cache; removed unused blank lines at the beginning of file 2004-10-21 01:05:43 +00:00
ANNOUNCE Version 1.19.1 2009-05-10 20:32:46 +00:00
base.make.in garbage collection fixups 2009-01-12 12:48:46 +00:00
ChangeLog Rewritten NSNumber implementation. This fixes several OS X-compatibility issues: 2010-02-14 12:57:44 +00:00
ChangeLog.1 Further copyright/license updates. 2005-07-15 22:51:23 +00:00
ChangeLog.2 Further copyright/license updates. 2005-07-15 22:51:23 +00:00
config.mak.in merge back reorganisation branch 2010-02-14 10:48:10 +00:00
configure merge back reorganisation branch 2010-02-14 10:48:10 +00:00
configure.ac merge back reorganisation branch 2010-02-14 10:48:10 +00:00
COPYING allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
COPYING.LIB allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
COPYINGv3 Added back in the v3 version of the license since the tools are still under v3 and the library is under v2. 2008-09-21 04:05:09 +00:00
GNUmakefile Very minor portability tweak for GNUmakefiles 2009-05-29 10:17:21 +00:00
gnustep-base.script.spec.in Some cleanup for make-2.0 changes 2007-03-01 13:43:23 +00:00
gnustep-base.spec.in Update License field 2007-10-30 14:21:37 +00:00
gnustep-base.spec.old Updated 2001-01-17 19:02:54 +00:00
INSTALL Version 1.15.1 2007-11-08 18:02:23 +00:00
install.sh merge back reorganisation branch 2010-02-14 10:48:10 +00:00
Makefile allow developers more time to adapt to LGPLv3 2008-06-08 10:38:33 +00:00
Makefile.postamble If GNUSTEP_BASE_DOMAIN does not match GNUSTEP_INSTALLATION_DOMAIN and we're using relative paths, print a long detailed explanation of how to fix the problem, then abort. If we're not using relative paths and no GNUSTEP_INSTALLATION_DOMAIN is specified, use the one specified at configure time. Fixed bug where SSL/config.status would be invoked all the times without need. 2009-01-06 22:52:31 +00:00
NEWS Version 1.19.1 2009-05-10 20:32:46 +00:00
README Version 1.19.1 2009-05-10 20:32:46 +00:00
Version Updates for 1.19.3 2009-09-01 09:03:28 +00:00

1 Readme
********

The GNUstep Base Library is a library of general-purpose, non-graphical
Objective C objects.  For example, it includes classes for strings,
object collections, byte streams, typed coders, invocations,
notifications, notification dispatchers, moments in time, network ports,
remote object messaging support (distributed objects), and event loops.

It provides functionality that aims to implement the non-graphical
portion of the OpenStep standard (the Foundation library).

1.1 Initial reading
===================

The file `NEWS' has the library's feature history.

   The files `INSTALL' or `GNUstep-HOWTO' (from the web site) gives
instructions for installing the library.

1.2 License
===========

The GNUstep libraries and library resources are covered under the GNU
Lesser Public License.  This means you can use these libraries in any
program (even non-free programs). If you distribute the libraries along
with your program, you must make the improvements you have made to the
libraries freely available. You should read the COPYING.LIB file for
more information. All files in the `Source', `Headers'
`NSCharacterSets', `NSTimeZones', `Resources', and `SSL' directories
and subdirectories under this are covered under the GLPL.

   GNUstep tools, test programs, and other files are covered under the
GNU Public License. This means if you make changes to these programs,
you cannot charge a fee, other than distribution fees, for others to
use the program. You should read the COPYING file for more information.
All files in the `Documentation', `Examples', `Tools', `config', and
`macosx' directories are covered under the GPL.

   With GNUstep-Base, we strongly recommend the use of the ffcall
libraries, which provides stack frame handling for NSInvocation and
NSConnection.  "Ffcall is under GNU GPL. As a special exception, if used
in GNUstep or in derivate works of GNUstep, the included parts of ffcall
are under GNU LGPL" (Text in quotes provided by the author of ffcall).

1.3 How can you help?
=====================

   * Give us feedback!  Tell us what you like; tell us what you think
     could be better.

     Please log bug reports on the GNUstep project page
     `http://savannah.gnu.org/bugs/?group=gnustep' or send bug reports
     to <bug-gnustep@gnu.org>.


     Happy hacking!

   Copyright (C) 2005 Free Software Foundation

   Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.