From a807e66d4a40fc722e84a2fb99cb4d7b3d6223e1 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 2 Jan 2006 10:04:10 +0000 Subject: [PATCH] prevent confusion by not using a standard name. --- simgear/nasal/hash.c | 6 +++--- simgear/nasal/vector.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/simgear/nasal/hash.c b/simgear/nasal/hash.c index 5730fdf3..55946535 100644 --- a/simgear/nasal/hash.c +++ b/simgear/nasal/hash.c @@ -49,7 +49,7 @@ static unsigned int hashcolumn(struct HashRec* h, naRef key) return (HASH_MAGIC * hashcode(key)) >> (32 - h->lgalloced); } -static struct HashRec* realloc(struct naHash* hash) +static struct HashRec* hashrealloc(struct naHash* hash) { struct HashRec *h, *h0 = hash->rec; int lga, cols, need = h0 ? h0->size - h0->dels : MIN_HASH_SIZE; @@ -171,7 +171,7 @@ void naHash_newsym(struct naHash* hash, naRef* sym, naRef* val) int col; struct HashRec* h = hash->rec; while(!h || h->size >= 1<lgalloced) - h = realloc(hash); + h = hashrealloc(hash); col = (HASH_MAGIC * sym->ref.ptr.str->hashcode) >> (32 - h->lgalloced); INSERT(h, *sym, *val, col); } @@ -198,7 +198,7 @@ void naHash_set(naRef hash, naRef key, naRef val) if((n = find(hash.ref.ptr.hash, key))) { n->val = val; return; } h = hash.ref.ptr.hash->rec; while(!h || h->size >= 1<lgalloced) - h = realloc(hash.ref.ptr.hash); + h = hashrealloc(hash.ref.ptr.hash); col = hashcolumn(h, key); INSERT(h, key, val, hashcolumn(h, key)); chkcycle(h->table[col], h->size - h->dels); diff --git a/simgear/nasal/vector.c b/simgear/nasal/vector.c index feac32ca..ba0ff6b6 100644 --- a/simgear/nasal/vector.c +++ b/simgear/nasal/vector.c @@ -13,7 +13,7 @@ static struct VecRec* newvecrec(struct VecRec* old) return vr; } -static void realloc(struct naVec* v) +static void vecrealloc(struct naVec* v) { struct VecRec* vr = newvecrec(v->rec); naGC_swapfree((void**)&(v->rec), vr); @@ -60,7 +60,7 @@ int naVec_append(naRef vec, naRef o) if(IS_VEC(vec)) { struct VecRec* r = vec.ref.ptr.vec->rec; while(!r || r->size >= r->alloced) { - realloc(vec.ref.ptr.vec); + vecrealloc(vec.ref.ptr.vec); r = vec.ref.ptr.vec->rec; } r->array[r->size] = o; @@ -91,7 +91,7 @@ naRef naVec_removelast(naRef vec) o = v->array[v->size - 1]; v->size--; if(v->size < (v->alloced >> 1)) - realloc(vec.ref.ptr.vec); + vecrealloc(vec.ref.ptr.vec); return o; } return naNil();