src/server/daemon/func.c

changeset 15
cff9c4101dd7
parent 14
b8bf95b39952
child 20
7b235fa88008
--- a/src/server/daemon/func.c	Sat Jan 14 13:53:44 2012 +0100
+++ b/src/server/daemon/func.c	Sat Jan 14 14:33:38 2012 +0100
@@ -30,13 +30,15 @@
 #include <stdlib.h>
 
 #include "../public/nsapi.h"
-#include "../util/map.h"
+
+#include "../ucx/map.h"
+
 #include "func.h"
 
-hashmap_t *function_map;
+UcxMap *function_map;
 
 void func_init() {
-    function_map = hashmap_new(128);
+    function_map = ucx_map_new(128);
 }
 
 void add_function(struct FuncStruct *func) {
@@ -44,7 +46,7 @@
 
     struct FuncStruct *f = malloc(sizeof(FuncStruct));
     *f = *func;
-    hashmap_put(function_map, sstr((char*)f->name), func);
+    ucx_map_cstr_put(function_map, (char*)f->name, func);
 }
 
 void add_functions(struct FuncStruct *funcs) {
@@ -56,5 +58,5 @@
 }
 
 FuncStruct* get_function(char *name) {
-    return hashmap_get(function_map, sstr(name));
+    return ucx_map_cstr_get(function_map, name);
 }

mercurial