mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix bug on some architectures.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26670 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
26dfc8d643
commit
dd93513d0b
3 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-06-16 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Additions/GNUstepBase/GSUnion.h: add NSUInteger type as addr
|
||||
* Headers/Additions/GNUstepBase/GSIMap.h: use addr for
|
||||
GSIMapNodeForSimpleKey() so that it works for pointers on machines
|
||||
where sizeof(int) != sizeof(void*)
|
||||
|
||||
2008-06-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/GSMime.m: Be more tolerant of illegal data in
|
||||
|
|
|
@ -576,9 +576,9 @@ GSIMapNodeForSimpleKey(GSIMapTable map, GSIMapKey key)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
bucket = map->buckets + key.uint % map->bucketCount;
|
||||
bucket = map->buckets + key.addr % map->bucketCount;
|
||||
node = bucket->firstNode;
|
||||
while ((node != 0) && node->key.uint != key.uint)
|
||||
while ((node != 0) && node->key.addr != key.addr)
|
||||
{
|
||||
node = node->nextInBucket;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02111 USA. */
|
||||
|
||||
/* Need Foundation/NSObjCRuntime.h for type declarations.
|
||||
*/
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
|
||||
/*
|
||||
* Definitions for bitmap mask of types of element in union.
|
||||
*/
|
||||
|
@ -58,6 +62,7 @@
|
|||
#if defined(GSUNION) && defined(GSUNION_TYPES)
|
||||
|
||||
typedef union {
|
||||
NSUInteger addr;
|
||||
#if ((GSUNION_TYPES) & GSUNION_OBJ)
|
||||
id obj;
|
||||
NSObject *nso;
|
||||
|
|
Loading…
Reference in a new issue