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/hash/hashInt.h | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/misc/hash/hashInt.h')
-rw-r--r-- | src/misc/hash/hashInt.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/misc/hash/hashInt.h b/src/misc/hash/hashInt.h index b7ec8a8c..7993e562 100644 --- a/src/misc/hash/hashInt.h +++ b/src/misc/hash/hashInt.h @@ -86,11 +86,11 @@ static inline Hash_Int_t * Hash_IntAlloc( int nBins ) Hash_Int_t * p; int i; assert(nBins > 0); - p = ALLOC( Hash_Int_t, 1); + p = ABC_ALLOC( Hash_Int_t, 1); p->nBins = nBins; p->fHash = Hash_DefaultHashFunc; p->nSize = 0; - p->pArray = ALLOC( Hash_Int_Entry_t *, nBins+1 ); + p->pArray = ABC_ALLOC( Hash_Int_Entry_t *, nBins+1 ); for(i=0; i<nBins; i++) p->pArray[i] = NULL; @@ -164,7 +164,7 @@ static inline void Hash_IntWriteEntry( Hash_Int_t *p, int key, int data ) // this key does not currently exist // create a new entry and add to bin p->nSize++; - (*pLast) = pEntry = ALLOC( Hash_Int_Entry_t, 1 ); + (*pLast) = pEntry = ABC_ALLOC( Hash_Int_Entry_t, 1 ); pEntry->pNext = NULL; pEntry->key = key; pEntry->data = data; @@ -206,7 +206,7 @@ static inline int Hash_IntEntry( Hash_Int_t *p, int key, int fCreate ) if (fCreate) { // create a new entry and add to bin p->nSize++; - (*pLast) = pEntry = ALLOC( Hash_Int_Entry_t, 1 ); + (*pLast) = pEntry = ABC_ALLOC( Hash_Int_Entry_t, 1 ); pEntry->pNext = NULL; pEntry->key = key; pEntry->data = 0; @@ -249,7 +249,7 @@ static inline int* Hash_IntEntryPtr( Hash_Int_t *p, int key ) // this key does not currently exist // create a new entry and add to bin p->nSize++; - (*pLast) = pEntry = ALLOC( Hash_Int_Entry_t, 1 ); + (*pLast) = pEntry = ABC_ALLOC( Hash_Int_Entry_t, 1 ); pEntry->pNext = NULL; pEntry->key = key; pEntry->data = 0; @@ -272,19 +272,19 @@ static inline void Hash_IntFree( Hash_Int_t *p ) { int bin; Hash_Int_Entry_t *pEntry, *pTemp; - // free bins + // ABC_FREE bins for(bin = 0; bin < p->nBins; bin++) { pEntry = p->pArray[bin]; while(pEntry) { pTemp = pEntry; pEntry = pEntry->pNext; - FREE( pTemp ); + ABC_FREE( pTemp ); } } - // free hash - FREE( p->pArray ); - FREE( p ); + // ABC_FREE hash + ABC_FREE( p->pArray ); + ABC_FREE( p ); } //////////////////////////////////////////////////////////////////////// |