summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2009-06-23 09:19:14 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2009-06-23 09:19:14 +0000
commitf27eb11e3f225d71d6fba59e3ca31cd68e420238 (patch)
treed70fd298b69ba031b9cb38eb931ea47f20d78d70 /include
parent841e061609fed066c32b0913ba93692dfc327021 (diff)
downloadlibwapcaplet-f27eb11e3f225d71d6fba59e3ca31cd68e420238.tar.gz
Merge Bo's libwapcaplet lwc_string_hash_value function and tests. r=dsilvers
svn path=/trunk/libwapcaplet/; revision=7927
Diffstat (limited to 'include')
-rw-r--r--include/libwapcaplet/libwapcaplet.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/libwapcaplet/libwapcaplet.h b/include/libwapcaplet/libwapcaplet.h
index 919d1e1..e896fc5 100644
--- a/include/libwapcaplet/libwapcaplet.h
+++ b/include/libwapcaplet/libwapcaplet.h
@@ -11,6 +11,7 @@
#include <sys/types.h>
#include <stdbool.h>
+#include <stdint.h>
/**
* Memory allocator type
@@ -126,5 +127,15 @@ extern const char *lwc_string_data(lwc_string *str);
*/
extern size_t lwc_string_length(lwc_string *str);
+/**
+ * Retrieve (or compute if unavailable) a hash value for the content of the string.
+ *
+ * @note This API should only be used as a convenient way to retrieve a hash
+ * value for the string. This hash value should not be relied on to be
+ * unique within an invocation of the program, nor should it be relied upon
+ * to be stable between invocations of the program. Never use the hash
+ * value as a way to directly identify the value of the string.
+ */
+extern uint32_t lwc_string_hash_value(lwc_string *str);
#endif /* libwapcaplet_h_ */