diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
commit | 0871bffae307e0553e0c5186336189e8b55cf6a6 (patch) | |
tree | 4571d1563fe33a53a57fea1c35fb668b9d33265f /src/misc/vec/vecAtt.h | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/misc/vec/vecAtt.h')
-rw-r--r-- | src/misc/vec/vecAtt.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/misc/vec/vecAtt.h b/src/misc/vec/vecAtt.h index 8d0a034b..9129321c 100644 --- a/src/misc/vec/vecAtt.h +++ b/src/misc/vec/vecAtt.h @@ -65,9 +65,9 @@ struct Vec_Att_t_ void ** pArrayPtr; // the pointer attribute array // attribute specific info void * pMan; // the manager for this attribute - void (*pFuncFreeMan) (void *); // the procedure to free the manager + void (*pFuncFreeMan) (void *); // the procedure to ABC_FREE the manager void*(*pFuncStartObj)(void *); // the procedure to start one attribute - void (*pFuncFreeObj) (void *, void *); // the procedure to free one attribute + void (*pFuncFreeObj) (void *, void *); // the procedure to ABC_FREE one attribute }; //////////////////////////////////////////////////////////////////////// @@ -96,14 +96,14 @@ static inline Vec_Att_t * Vec_AttAlloc( void (*pFuncFreeObj) (void *, void *) ) { Vec_Att_t * p; - p = ALLOC( Vec_Att_t, 1 ); + p = ABC_ALLOC( Vec_Att_t, 1 ); memset( p, 0, sizeof(Vec_Att_t) ); p->pMan = pMan; p->pFuncFreeMan = pFuncFreeMan; p->pFuncStartObj = pFuncStartObj; p->pFuncFreeObj = pFuncFreeObj; p->nCap = nSize? nSize : 16; - p->pArrayPtr = ALLOC( void *, p->nCap ); + p->pArrayPtr = ABC_ALLOC( void *, p->nCap ); memset( p->pArrayPtr, 0, sizeof(void *) * p->nCap ); return p; } @@ -124,7 +124,7 @@ static inline void * Vec_AttFree( Vec_Att_t * p, int fFreeMan ) void * pMan; if ( p == NULL ) return NULL; - // free the attributes of objects + // ABC_FREE the attributes of objects if ( p->pFuncFreeObj ) { int i; @@ -132,12 +132,12 @@ static inline void * Vec_AttFree( Vec_Att_t * p, int fFreeMan ) if ( p->pArrayPtr[i] ) p->pFuncFreeObj( p->pMan, p->pArrayPtr[i] ); } - // free the memory manager + // ABC_FREE the memory manager pMan = fFreeMan? NULL : p->pMan; if ( p->pMan && fFreeMan ) p->pFuncFreeMan( p->pMan ); - FREE( p->pArrayPtr ); - FREE( p ); + ABC_FREE( p->pArrayPtr ); + ABC_FREE( p ); return pMan; } @@ -154,7 +154,7 @@ static inline void * Vec_AttFree( Vec_Att_t * p, int fFreeMan ) ***********************************************************************/ static inline void Vec_AttClear( Vec_Att_t * p ) { - // free the attributes of objects + // ABC_FREE the attributes of objects if ( p->pFuncFreeObj ) { int i; @@ -204,7 +204,7 @@ static inline void Vec_AttGrow( Vec_Att_t * p, int nCapMin ) { if ( p->nCap >= nCapMin ) return; - p->pArrayPtr = REALLOC( void *, p->pArrayPtr, nCapMin ); + p->pArrayPtr = ABC_REALLOC( void *, p->pArrayPtr, nCapMin ); memset( p->pArrayPtr + p->nCap, 0, sizeof(void *) * (nCapMin - p->nCap) ); p->nCap = nCapMin; } |