src/server/func.c

changeset 3
137197831306
parent 1
3c066d52342d
--- a/src/server/func.c	Tue Sep 06 22:37:51 2011 +0200
+++ b/src/server/func.c	Sun Oct 30 16:26:57 2011 +0100
@@ -40,6 +40,8 @@
 }
 
 void add_function(struct FuncStruct *func) {
+    printf("add function: %s\n", func->name);
+
     struct FuncStruct *f = malloc(sizeof(FuncStruct));
     *f = *func;
     hashmap_put(function_map, sstr((char*)f->name), func);
@@ -53,3 +55,6 @@
     }
 }
 
+FuncStruct* get_function(char *name) {
+    return hashmap_get(function_map, sstr(name));
+}

mercurial