mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
put extra info in array, and allow retain/release macros to refer to it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12324 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
04940f531e
commit
1d89ca34a4
15 changed files with 136 additions and 99 deletions
16
ChangeLog
16
ChangeLog
|
@ -1,3 +1,19 @@
|
|||
2002-01-31 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
* Headers/gnustep/base/GSIArray.h: Use array as parameter to macros.
|
||||
* Source/GSAttributedString.m: Update for GSIArray change.
|
||||
* Source/GSCountedSet.m: Update for GSIArray change.
|
||||
* Source/GSDictionary.m: Update for GSIArray change.
|
||||
* Source/GSFFCallInvocation.m: Update for GSIArray change.
|
||||
* Source/NSArchiver.m: Update for GSIArray change.
|
||||
* Source/NSConnection.m: Update for GSIArray change.
|
||||
* Source/NSFileManager.m: Update for GSIArray change.
|
||||
* Source/NSNotificationCenter.m: Update for GSIArray change.
|
||||
* Source/NSObject.m: Update for GSIArray change.
|
||||
* Source/NSPortCoder.m: Update for GSIArray change.
|
||||
* Source/NSRunLoop.m: Update for GSIArray change.
|
||||
* Source/NSSerializer.m: Update for GSIArray change.
|
||||
* Source/NSUnarchiver.m: Update for GSIArray change.
|
||||
|
||||
2002-01-30 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Foundation/NSRunLoop.h: Go back to new version.
|
||||
|
|
|
@ -56,7 +56,48 @@
|
|||
* Defined if no release operation is needed for an item
|
||||
* GSI_ARRAY_NO_RETAIN
|
||||
* Defined if no retain operation is needed for a an item
|
||||
*
|
||||
* The value GSI_ARRAY_EXTRA may be defined as the type of an extra
|
||||
* field produced in every array. The name of this field is 'extra'.
|
||||
*
|
||||
* The value GSI_ARRAY_TEXTRA may be defined as an additional type
|
||||
* which must be valid as an array element. Otherwise the types are
|
||||
* controlled by the mechanism in GSUnion.h
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* If GSI_NEW is defined we expect to pass a pointer to the maptable as
|
||||
* the first argument to each macro so we can have the macros behave
|
||||
* differently for different maptables.
|
||||
* The old version will become obsolete and be removed at some point.
|
||||
*/
|
||||
#ifdef GSI_NEW
|
||||
|
||||
#ifdef GSI_ARRAY_NO_RETAIN
|
||||
#ifdef GSI_ARRAY_RETAIN
|
||||
#undef GSI_ARRAY_RETAIN
|
||||
#endif
|
||||
#define GSI_ARRAY_RETAIN(A, X)
|
||||
#else
|
||||
#ifndef GSI_ARRAY_RETAIN
|
||||
#define GSI_ARRAY_RETAIN(A, X) [(X).obj retain]
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef GSI_ARRAY_NO_RELEASE
|
||||
#ifdef GSI_ARRAY_RELEASE
|
||||
#undef GSI_ARRAY_RELEASE
|
||||
#endif
|
||||
#define GSI_ARRAY_RELEASE(A, X)
|
||||
#else
|
||||
#ifndef GSI_ARRAY_RELEASE
|
||||
#define GSI_ARRAY_RELEASE(A, X) [(X).obj release]
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef GSI_ARRAY_NO_RETAIN
|
||||
#ifdef GSI_ARRAY_RETAIN
|
||||
#undef GSI_ARRAY_RETAIN
|
||||
|
@ -79,6 +120,8 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there is no bitmask defined to supply the types that
|
||||
* may be stored in the array, default to permitting all types.
|
||||
|
@ -106,8 +149,11 @@
|
|||
#ifdef GSUNION_EXTRA
|
||||
#undef GSUNION_EXTRA
|
||||
#endif
|
||||
#ifdef GSI_ARRAY_EXTRA
|
||||
#define GSUNION_EXTRA GSI_ARRAY_EXTRA
|
||||
/*
|
||||
* Override extra type used in array value
|
||||
*/
|
||||
#ifdef GSI_ARRAY_TEXTRA
|
||||
#define GSUNION_EXTRA GSI_ARRAY_TEXTRA
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -121,6 +167,9 @@ struct _GSIArray {
|
|||
unsigned cap;
|
||||
unsigned old;
|
||||
NSZone *zone;
|
||||
#ifdef GSI_ARRAY_EXTRA
|
||||
GSI_ARRAY_EXTRA extra;
|
||||
#endif
|
||||
};
|
||||
typedef struct _GSIArray GSIArray_t;
|
||||
typedef struct _GSIArray *GSIArray;
|
||||
|
@ -187,7 +236,11 @@ GSIArrayInsertItem(GSIArray array, GSIArrayItem item, unsigned index)
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RETAIN(array, item);
|
||||
#else
|
||||
GSI_ARRAY_RETAIN(item);
|
||||
#endif
|
||||
GSI_ARRAY_CHECK;
|
||||
if (array->count == array->cap)
|
||||
{
|
||||
|
@ -222,7 +275,11 @@ GSIArrayInsertItemNoRetain(GSIArray array, GSIArrayItem item, unsigned index)
|
|||
static INLINE void
|
||||
GSIArrayAddItem(GSIArray array, GSIArrayItem item)
|
||||
{
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RETAIN(array, item);
|
||||
#else
|
||||
GSI_ARRAY_RETAIN(item);
|
||||
#endif
|
||||
GSI_ARRAY_CHECK;
|
||||
if (array->count == array->cap)
|
||||
{
|
||||
|
@ -349,7 +406,11 @@ GSIArrayRemoveItemAtIndex(GSIArray array, unsigned index)
|
|||
while (++index < array->count)
|
||||
array->ptr[index-1] = array->ptr[index];
|
||||
array->count--;
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RELEASE(array, tmp);
|
||||
#else
|
||||
GSI_ARRAY_RELEASE(tmp);
|
||||
#endif
|
||||
}
|
||||
|
||||
static INLINE void
|
||||
|
@ -358,7 +419,11 @@ GSIArrayRemoveLastItem(GSIArray array)
|
|||
#ifdef GSI_ARRAY_CHECKS
|
||||
NSCAssert(array->count, NSInvalidArgumentException);
|
||||
#endif
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RELEASE(array, array->ptr[array->count-1]);
|
||||
#else
|
||||
GSI_ARRAY_RELEASE(array->ptr[array->count-1]);
|
||||
#endif
|
||||
array->count--;
|
||||
}
|
||||
|
||||
|
@ -383,9 +448,17 @@ GSIArraySetItemAtIndex(GSIArray array, GSIArrayItem item, unsigned index)
|
|||
NSCAssert(index < array->count, NSInvalidArgumentException);
|
||||
#endif
|
||||
tmp = array->ptr[index];
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RETAIN(array, item);
|
||||
#else
|
||||
GSI_ARRAY_RETAIN(item);
|
||||
#endif
|
||||
array->ptr[index] = item;
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RELEASE(array, tmp);
|
||||
#else
|
||||
GSI_ARRAY_RELEASE(tmp);
|
||||
#endif
|
||||
}
|
||||
|
||||
static INLINE GSIArrayItem
|
||||
|
@ -425,7 +498,11 @@ GSIArrayRemoveItemsFromIndex(GSIArray array, unsigned index)
|
|||
#ifndef GSI_ARRAY_NO_RELEASE
|
||||
while (array->count-- > index)
|
||||
{
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RELEASE(array, array->ptr[array->count]);
|
||||
#else
|
||||
GSI_ARRAY_RELEASE(array->ptr[array->count]);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
array->count = index;
|
||||
|
@ -438,7 +515,11 @@ GSIArrayRemoveAllItems(GSIArray array)
|
|||
#ifndef GSI_ARRAY_NO_RELEASE
|
||||
while (array->count--)
|
||||
{
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RELEASE(array, array->ptr[array->count]);
|
||||
#else
|
||||
GSI_ARRAY_RELEASE(array->ptr[array->count]);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
array->count = 0;
|
||||
|
@ -477,7 +558,11 @@ GSIArrayCopyWithZone(GSIArray array, NSZone *zone)
|
|||
|
||||
for (i = 0; i < array->count; i++)
|
||||
{
|
||||
#ifdef GSI_NEW
|
||||
GSI_ARRAY_RETAIN(array, array->ptr[i]);
|
||||
#else
|
||||
GSI_ARRAY_RETAIN(array->ptr[i]);
|
||||
#endif
|
||||
new->ptr[new->count++] = array->ptr[i];
|
||||
}
|
||||
return new;
|
||||
|
|
|
@ -91,19 +91,12 @@
|
|||
|
||||
|
||||
|
||||
#ifdef GSI_NEW
|
||||
#define GSI_NEW 1
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
#define GSI_MAP_RELEASE_KEY(M, X)
|
||||
#define GSI_MAP_RETAIN_VAL(M, X)
|
||||
#define GSI_MAP_RELEASE_VAL(M, X)
|
||||
#define GSI_MAP_EQUAL(M, X,Y) [(X).obj isEqualToDictionary: (Y).obj]
|
||||
#else
|
||||
#define GSI_MAP_RETAIN_KEY(X)
|
||||
#define GSI_MAP_RELEASE_KEY(X)
|
||||
#define GSI_MAP_RETAIN_VAL(X)
|
||||
#define GSI_MAP_RELEASE_VAL(X)
|
||||
#define GSI_MAP_EQUAL(X,Y) [(X).obj isEqualToDictionary: (Y).obj]
|
||||
#endif
|
||||
|
||||
#define GSI_MAP_KTYPES GSUNION_OBJ
|
||||
#define GSI_MAP_VTYPES GSUNION_INT
|
||||
|
|
|
@ -32,13 +32,9 @@
|
|||
#include <Foundation/NSDebug.h>
|
||||
|
||||
|
||||
#ifdef GSI_NEW
|
||||
#define GSI_NEW 1
|
||||
#define GSI_MAP_RETAIN_VAL(M, X)
|
||||
#define GSI_MAP_RELEASE_VAL(M, X)
|
||||
#else
|
||||
#define GSI_MAP_RETAIN_VAL(X)
|
||||
#define GSI_MAP_RELEASE_VAL(X)
|
||||
#endif
|
||||
#define GSI_MAP_KTYPES GSUNION_OBJ
|
||||
#define GSI_MAP_VTYPES GSUNION_INT
|
||||
|
||||
|
@ -297,11 +293,7 @@
|
|||
{
|
||||
GSIMapNode node;
|
||||
|
||||
#ifdef GSI_NEW
|
||||
node = GSIMapNodeForKeyInBucket(&map, bucket, (GSIMapKey)anObject);
|
||||
#else
|
||||
node = GSIMapNodeForKeyInBucket(bucket, (GSIMapKey)anObject);
|
||||
#endif
|
||||
if (node != 0)
|
||||
{
|
||||
if (--node->value.uint == 0)
|
||||
|
|
|
@ -33,23 +33,17 @@
|
|||
|
||||
#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>
|
||||
|
||||
|
|
|
@ -106,21 +106,13 @@ ReturnTypeEqualsReturnType (vacallReturnTypeInfo *a, vacallReturnTypeInfo *b)
|
|||
&& (a->type == b->type);
|
||||
}
|
||||
|
||||
#ifdef GSI_NEW
|
||||
#define GSI_NEW 1
|
||||
#define GSI_MAP_HASH(M, X) ReturnTypeHash (X.ptr)
|
||||
#define GSI_MAP_EQUAL(M, X,Y) ReturnTypeEqualsReturnType (X.ptr, Y.ptr)
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
#define GSI_MAP_RETAIN_VAL(M, X)
|
||||
#define GSI_MAP_RELEASE_KEY(M, X)
|
||||
#define GSI_MAP_RELEASE_VAL(M, X)
|
||||
#else
|
||||
#define GSI_MAP_HASH(X) ReturnTypeHash (X.ptr)
|
||||
#define GSI_MAP_EQUAL(X,Y) ReturnTypeEqualsReturnType (X.ptr, Y.ptr)
|
||||
#define GSI_MAP_RETAIN_KEY(X)
|
||||
#define GSI_MAP_RETAIN_VAL(X)
|
||||
#define GSI_MAP_RELEASE_KEY(X)
|
||||
#define GSI_MAP_RELEASE_VAL(X)
|
||||
#endif
|
||||
|
||||
#include <base/GSIMap.h>
|
||||
|
||||
|
|
|
@ -28,21 +28,13 @@
|
|||
/*
|
||||
* Setup for inline operation of pointer map tables.
|
||||
*/
|
||||
#ifdef GSI_NEW
|
||||
#define GSI_NEW 1
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
#define GSI_MAP_RELEASE_KEY(M, X)
|
||||
#define GSI_MAP_RETAIN_VAL(M, X)
|
||||
#define GSI_MAP_RELEASE_VAL(M, X)
|
||||
#define GSI_MAP_HASH(M, X) ((X).uint)
|
||||
#define GSI_MAP_EQUAL(M, X,Y) ((X).uint == (Y).uint)
|
||||
#else
|
||||
#define GSI_MAP_RETAIN_KEY(X)
|
||||
#define GSI_MAP_RELEASE_KEY(X)
|
||||
#define GSI_MAP_RETAIN_VAL(X)
|
||||
#define GSI_MAP_RELEASE_VAL(X)
|
||||
#define GSI_MAP_HASH(X) ((X).uint)
|
||||
#define GSI_MAP_EQUAL(X,Y) ((X).uint == (Y).uint)
|
||||
#endif
|
||||
|
||||
#include <base/GSIMap.h>
|
||||
|
||||
|
|
|
@ -37,21 +37,13 @@
|
|||
/*
|
||||
* Setup for inline operation of pointer map tables.
|
||||
*/
|
||||
#ifdef GSI_NEW
|
||||
#define GSI_NEW 1
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
#define GSI_MAP_RELEASE_KEY(M, X)
|
||||
#define GSI_MAP_RETAIN_VAL(M, X)
|
||||
#define GSI_MAP_RELEASE_VAL(M, X)
|
||||
#define GSI_MAP_HASH(M, X) ((X).uint ^ ((X).uint >> 3))
|
||||
#define GSI_MAP_EQUAL(M, X,Y) ((X).ptr == (Y).ptr)
|
||||
#else
|
||||
#define GSI_MAP_RETAIN_KEY(X)
|
||||
#define GSI_MAP_RELEASE_KEY(X)
|
||||
#define GSI_MAP_RETAIN_VAL(X)
|
||||
#define GSI_MAP_RELEASE_VAL(X)
|
||||
#define GSI_MAP_HASH(X) ((X).uint ^ ((X).uint >> 3))
|
||||
#define GSI_MAP_EQUAL(X,Y) ((X).ptr == (Y).ptr)
|
||||
#endif
|
||||
|
||||
#include <base/GSIMap.h>
|
||||
|
||||
|
|
|
@ -1376,11 +1376,12 @@ inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
closedir(X.pointer);
|
||||
}
|
||||
|
||||
#define GSI_NEW 1
|
||||
#define GSI_ARRAY_TYPES 0
|
||||
#define GSI_ARRAY_EXTRA GSEnumeratedDirectory
|
||||
#define GSI_ARRAY_TEXTRA GSEnumeratedDirectory
|
||||
|
||||
#define GSI_ARRAY_RELEASE(X) gsedRelease(X.ext)
|
||||
#define GSI_ARRAY_RETAIN(X)
|
||||
#define GSI_ARRAY_RELEASE(A, X) gsedRelease(X.ext)
|
||||
#define GSI_ARRAY_RETAIN(A, X)
|
||||
|
||||
#include <base/GSIArray.h>
|
||||
|
||||
|
|
|
@ -109,15 +109,17 @@ static void listFree(Observation *list);
|
|||
static void obsRetain(Observation *o);
|
||||
static void obsFree(Observation *o);
|
||||
|
||||
#define GSI_ARRAY_TYPES 0
|
||||
#define GSI_ARRAY_EXTRA Observation*
|
||||
|
||||
#define GSI_ARRAY_RELEASE(X) obsFree(X.ext)
|
||||
#define GSI_ARRAY_RETAIN(X) obsRetain(X.ext)
|
||||
#define GSI_NEW 1
|
||||
|
||||
#define GSI_ARRAY_TYPES 0
|
||||
#define GSI_ARRAY_TEXTRA Observation*
|
||||
|
||||
#define GSI_ARRAY_RELEASE(A, X) obsFree(X.ext)
|
||||
#define GSI_ARRAY_RETAIN(A, X) obsRetain(X.ext)
|
||||
|
||||
#include <base/GSIArray.h>
|
||||
|
||||
#ifdef GSI_NEW
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
#define GSI_MAP_RELEASE_KEY(M, X) ({if ((((gsaddr)X.obj) & 1) == 0) \
|
||||
RELEASE(X.obj);})
|
||||
|
@ -125,15 +127,6 @@ static void obsFree(Observation *o);
|
|||
#define GSI_MAP_EQUAL(M, X,Y) doEqual(X.obj, Y.obj)
|
||||
#define GSI_MAP_RETAIN_VAL(M, X)
|
||||
#define GSI_MAP_RELEASE_VAL(M, X)
|
||||
#else
|
||||
#define GSI_MAP_RETAIN_KEY(X)
|
||||
#define GSI_MAP_RELEASE_KEY(X) ({if ((((gsaddr)X.obj) & 1) == 0) \
|
||||
RELEASE(X.obj);})
|
||||
#define GSI_MAP_HASH(X) doHash(X.obj)
|
||||
#define GSI_MAP_EQUAL(X,Y) doEqual(X.obj, Y.obj)
|
||||
#define GSI_MAP_RETAIN_VAL(X)
|
||||
#define GSI_MAP_RELEASE_VAL(X)
|
||||
#endif
|
||||
|
||||
#define GSI_MAP_KTYPES GSUNION_OBJ|GSUNION_INT
|
||||
#define GSI_MAP_VTYPES GSUNION_PTR
|
||||
|
|
|
@ -225,7 +225,7 @@ NSDecrementExtraRefCountWasZero(id anObject)
|
|||
|
||||
#else
|
||||
|
||||
#define GSI_NEW
|
||||
#define GSI_NEW 1
|
||||
#define GSI_MAP_EQUAL(M, X, Y) (X.obj == Y.obj)
|
||||
#define GSI_MAP_HASH(M, X) (X.ptr >> 2)
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
|
|
|
@ -49,29 +49,21 @@
|
|||
/*
|
||||
* Setup for inline operation of pointer map tables.
|
||||
*/
|
||||
#ifdef GSI_NEW
|
||||
#define GSI_NEW 1
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
#define GSI_MAP_RELEASE_KEY(M, X)
|
||||
#define GSI_MAP_RETAIN_VAL(M, X)
|
||||
#define GSI_MAP_RELEASE_VAL(M, X)
|
||||
#define GSI_MAP_HASH(M, X) ((X).uint)
|
||||
#define GSI_MAP_EQUAL(M, X,Y) ((X).uint == (Y).uint)
|
||||
#else
|
||||
#define GSI_MAP_RETAIN_KEY(X)
|
||||
#define GSI_MAP_RELEASE_KEY(X)
|
||||
#define GSI_MAP_RETAIN_VAL(X)
|
||||
#define GSI_MAP_RELEASE_VAL(X)
|
||||
#define GSI_MAP_HASH(X) ((X).uint)
|
||||
#define GSI_MAP_EQUAL(X,Y) ((X).uint == (Y).uint)
|
||||
#endif
|
||||
|
||||
#include <base/GSIMap.h>
|
||||
|
||||
/*
|
||||
* Setup for inline operation of arrays.
|
||||
*/
|
||||
#define GSI_ARRAY_RETAIN(X)
|
||||
#define GSI_ARRAY_RELEASE(X)
|
||||
#define GSI_ARRAY_RETAIN(A, X)
|
||||
#define GSI_ARRAY_RELEASE(A, X)
|
||||
#define GSI_ARRAY_TYPES GSUNION_OBJ|GSUNION_SEL|GSUNION_STR
|
||||
|
||||
#include <base/GSIArray.h>
|
||||
|
|
|
@ -306,14 +306,16 @@ static inline BOOL timerInvalidated(NSTimer* timer)
|
|||
* Setup for inline operation of arrays.
|
||||
*/
|
||||
|
||||
#define GSI_NEW 1
|
||||
|
||||
#define GSI_ARRAY_TYPES GSUNION_OBJ
|
||||
|
||||
#if GS_WITH_GC == 0
|
||||
#define GSI_ARRAY_RELEASE(X) [(X).obj release]
|
||||
#define GSI_ARRAY_RETAIN(X) [(X).obj retain]
|
||||
#define GSI_ARRAY_RELEASE(A, X) [(X).obj release]
|
||||
#define GSI_ARRAY_RETAIN(A, X) [(X).obj retain]
|
||||
#else
|
||||
#define GSI_ARRAY_RELEASE(X)
|
||||
#define GSI_ARRAY_RETAIN(X)
|
||||
#define GSI_ARRAY_RELEASE(A, X)
|
||||
#define GSI_ARRAY_RETAIN(A, X)
|
||||
#endif
|
||||
|
||||
#include <base/GSIArray.h>
|
||||
|
|
|
@ -50,29 +50,21 @@
|
|||
/*
|
||||
* Setup for inline operation of string map tables.
|
||||
*/
|
||||
#ifdef GSI_NEW
|
||||
#define GSI_NEW 1
|
||||
#define GSI_MAP_RETAIN_KEY(M, X)
|
||||
#define GSI_MAP_RELEASE_KEY(M, X)
|
||||
#define GSI_MAP_RETAIN_VAL(M, X)
|
||||
#define GSI_MAP_RELEASE_VAL(M, X)
|
||||
#define GSI_MAP_HASH(M, X) [(X).obj hash]
|
||||
#define GSI_MAP_EQUAL(M, X,Y) [(X).obj isEqualToString: (Y).obj]
|
||||
#else
|
||||
#define GSI_MAP_RETAIN_KEY(X)
|
||||
#define GSI_MAP_RELEASE_KEY(X)
|
||||
#define GSI_MAP_RETAIN_VAL(X)
|
||||
#define GSI_MAP_RELEASE_VAL(X)
|
||||
#define GSI_MAP_HASH(X) [(X).obj hash]
|
||||
#define GSI_MAP_EQUAL(X,Y) [(X).obj isEqualToString: (Y).obj]
|
||||
#endif
|
||||
|
||||
#include <base/GSIMap.h>
|
||||
|
||||
/*
|
||||
* Setup for inline operation of string arrays.
|
||||
*/
|
||||
#define GSI_ARRAY_RETAIN(X)
|
||||
#define GSI_ARRAY_RELEASE(X)
|
||||
#define GSI_ARRAY_RETAIN(A, X)
|
||||
#define GSI_ARRAY_RELEASE(A, X)
|
||||
#define GSI_ARRAY_TYPES GSUNION_OBJ
|
||||
|
||||
#include <base/GSIArray.h>
|
||||
|
|
|
@ -31,11 +31,12 @@
|
|||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSByteOrder.h>
|
||||
|
||||
#define GSI_NEW 1
|
||||
/*
|
||||
* Setup for inline operation of arrays.
|
||||
*/
|
||||
#define GSI_ARRAY_RETAIN(X)
|
||||
#define GSI_ARRAY_RELEASE(X)
|
||||
#define GSI_ARRAY_RETAIN(A, X)
|
||||
#define GSI_ARRAY_RELEASE(A, X)
|
||||
#define GSI_ARRAY_TYPES GSUNION_OBJ|GSUNION_SEL|GSUNION_STR
|
||||
|
||||
#include <base/GSIArray.h>
|
||||
|
|
Loading…
Reference in a new issue