hashtable bugfix

GSI code version optional.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12358 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-02-01 10:19:56 +00:00
parent f6901afbe4
commit 59e387cc17
14 changed files with 150 additions and 17 deletions

View file

@ -33,17 +33,23 @@
#include <base/behavior.h>
#define GSI_NEW 1
/*
* The 'Fastmap' stuff provides an inline implementation of a mapping
* table - for maximum performance.
*/
#define GSI_MAP_KTYPES GSUNION_OBJ
#define GSI_MAP_VTYPES GSUNION_OBJ
#ifdef GSI_NEW
#define GSI_MAP_HASH(M, X) [X.obj hash]
#define GSI_MAP_EQUAL(M, X,Y) [X.obj isEqual: Y.obj]
#define GSI_MAP_RETAIN_KEY(M, X) ((id)(X).obj) = \
[((id)(X).obj) copyWithZone: map->zone]
#else
#define GSI_MAP_HASH(X) [X.obj hash]
#define GSI_MAP_EQUAL(X,Y) [X.obj isEqual: Y.obj]
#define GSI_MAP_RETAIN_KEY(X) ((id)(X).obj) = \
[((id)(X).obj) copyWithZone: map->zone]
#endif
#include <base/GSIMap.h>