mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12325 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1d89ca34a4
commit
8c0ba22d59
3 changed files with 19 additions and 7 deletions
|
@ -60,7 +60,7 @@
|
|||
* 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
|
||||
* The value GSI_ARRAY_TYPE 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
|
||||
*/
|
||||
|
@ -149,11 +149,21 @@
|
|||
#ifdef GSUNION_EXTRA
|
||||
#undef GSUNION_EXTRA
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Override extra type used in array value
|
||||
*/
|
||||
#ifdef GSI_ARRAY_TEXTRA
|
||||
#define GSUNION_EXTRA GSI_ARRAY_TEXTRA
|
||||
#ifdef GSI_NEW
|
||||
|
||||
#ifdef GSI_ARRAY_TYPE
|
||||
#define GSUNION_EXTRA GSI_ARRAY_TYPE
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef GSI_ARRAY_EXTRA
|
||||
#define GSUNION_EXTRA GSI_ARRAY_EXTRA
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -167,9 +177,11 @@ struct _GSIArray {
|
|||
unsigned cap;
|
||||
unsigned old;
|
||||
NSZone *zone;
|
||||
#ifdef GSI_NEW
|
||||
#ifdef GSI_ARRAY_EXTRA
|
||||
GSI_ARRAY_EXTRA extra;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
typedef struct _GSIArray GSIArray_t;
|
||||
typedef struct _GSIArray *GSIArray;
|
||||
|
|
|
@ -1377,8 +1377,8 @@ inline void gsedRelease(GSEnumeratedDirectory X)
|
|||
}
|
||||
|
||||
#define GSI_NEW 1
|
||||
#define GSI_ARRAY_TYPES 0
|
||||
#define GSI_ARRAY_TEXTRA GSEnumeratedDirectory
|
||||
#define GSI_ARRAY_TYPES 0
|
||||
#define GSI_ARRAY_TYPE GSEnumeratedDirectory
|
||||
|
||||
#define GSI_ARRAY_RELEASE(A, X) gsedRelease(X.ext)
|
||||
#define GSI_ARRAY_RETAIN(A, X)
|
||||
|
|
|
@ -112,8 +112,8 @@ static void obsFree(Observation *o);
|
|||
|
||||
#define GSI_NEW 1
|
||||
|
||||
#define GSI_ARRAY_TYPES 0
|
||||
#define GSI_ARRAY_TEXTRA Observation*
|
||||
#define GSI_ARRAY_TYPES 0
|
||||
#define GSI_ARRAY_TYPE Observation*
|
||||
|
||||
#define GSI_ARRAY_RELEASE(A, X) obsFree(X.ext)
|
||||
#define GSI_ARRAY_RETAIN(A, X) obsRetain(X.ext)
|
||||
|
|
Loading…
Reference in a new issue