aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--collections/map/map.c6
-rw-r--r--collections/map/map.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/collections/map/map.c b/collections/map/map.c
index 62cb016..00f2225 100644
--- a/collections/map/map.c
+++ b/collections/map/map.c
@@ -102,7 +102,7 @@ void *key, *val;
return -1;
}
-void* map_reset_key(root, key)
+void* map_set_key(root, key)
map *root;
void *key;
{
@@ -115,10 +115,10 @@ void *key;
cmp = root->cmp(root->key, key);
if (cmp < 0)
- return map_reset_key(root->left, key);
+ return map_set_key(root->left, key);
if (cmp > 0)
- return map_reset_key(root->right, key);
+ return map_set_key(root->right, key);
tmp = root->key;
root->key = key;
diff --git a/collections/map/map.h b/collections/map/map.h
index d1a0012..9de3ba1 100644
--- a/collections/map/map.h
+++ b/collections/map/map.h
@@ -12,9 +12,11 @@ int map_size(map*);
/*data*/
int map_insert(map*, void*, void*);
-void* map_reset_key(map*, void*);
void* map_index(map*, void*);
+void* map_set_key(map*, void*);
+
+
/*memory*/
void map_clear(map*);
void map_free(map*);