~ubuntu-branches/ubuntu/precise/gnustep-base/precise

« back to all changes in this revision

Viewing changes to Headers/Additions/GNUstepBase/GSIMap.h

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-07-05 09:49:51 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080705094951-gs19i3erqo2xx6if
Tags: 1.16.1-2ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  + debian/rules:
    - Add lpia to ALL_ARCHS supported architectures.
  + debian/control:
    - Add lpia architecture where needed.
  + debian/control{,.m4}:
    - Update Maintainer field as per spec.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 * This library is free software; you can redistribute it and/or
12
12
 * modify it under the terms of the GNU Lesser General Public
13
13
 * License as published by the Free Software Foundation; either
14
 
 * version 3 of the License, or (at your option) any later version.
 
14
 * version 2 of the License, or (at your option) any later version.
15
15
 * 
16
16
 * This library is distributed in the hope that it will be useful,
17
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
563
563
#if     (GSI_MAP_KTYPES & GSUNION_INT)
564
564
/*
565
565
 * Specialized lookup for the case where keys are known to be simple integer
566
 
 * or pointer values that are their own hash values and con be compared with
567
 
 * a test for integer equality.
 
566
 * or pointer values that are their own hash values (when converted to unsigned
 
567
 * integers) and can be compared with a test for integer equality.
568
568
 */
569
569
static INLINE GSIMapNode 
570
570
GSIMapNodeForSimpleKey(GSIMapTable map, GSIMapKey key)
576
576
    {
577
577
      return 0;
578
578
    }
579
 
  bucket = map->buckets + key.uint % map->bucketCount;
 
579
  bucket = map->buckets + ((unsigned)key.addr) % map->bucketCount;
580
580
  node = bucket->firstNode;
581
 
  while ((node != 0) && node->key.uint != key.uint)
 
581
  while ((node != 0) && node->key.addr != key.addr)
582
582
    {
583
583
      node = node->nextInBucket;
584
584
    }