Added stringstore_ref

Sun, 21 Jan 2007 21:02:55 +0100

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sun, 21 Jan 2007 21:02:55 +0100
changeset 104
abbac137bdac
parent 103
76174c5f04b5
child 105
de53cada1423

Added stringstore_ref

stringstore.c file | annotate | diff | comparison | revisions
stringstore.h file | annotate | diff | comparison | revisions
--- a/stringstore.c	Tue Oct 17 00:32:05 2006 +0200
+++ b/stringstore.c	Sun Jan 21 21:02:55 2007 +0100
@@ -96,3 +96,12 @@
     }
 }
 
+
+void stringstore_ref(StringId id)
+{
+    Rb_node node=(Rb_node)id;
+    
+    if(node!=NULL)
+        node->v.ival++;
+}
+
--- a/stringstore.h	Tue Oct 17 00:32:05 2006 +0200
+++ b/stringstore.h	Sun Jan 21 21:02:55 2007 +0100
@@ -18,5 +18,6 @@
 extern StringId stringstore_find(const char *str);
 extern StringId stringstore_alloc(const char *str);
 extern void stringstore_free(StringId id);
+extern void stringstore_ref(StringId id);
 
 #endif /* LIBTU_STRINGSTORE_H */

mercurial