if(buck) {
data = buck->data;
- xfree(buck);
+ mdvi_free(buck);
}
return data;
}
hash->nkeys--;
/* destroy the bucket */
ptr = buck->data;
- xfree(buck);
+ mdvi_free(buck);
return ptr;
}
return -1;
if(hash->hash_free)
hash->hash_free(buck->key, buck->data);
- xfree(buck);
+ mdvi_free(buck);
return 0;
}
hash->buckets[i] = buck->next;
if(hash->hash_free)
hash->hash_free(buck->key, buck->data);
- xfree(buck);
+ mdvi_free(buck);
}
}
hash->nkeys = 0;
if(!reuse && hash->buckets) {
- xfree(hash->buckets);
+ mdvi_free(hash->buckets);
hash->buckets = NULL;
hash->nbucks = 0;
} /* otherwise, it is left empty, ready to be reused */