From f27eb11e3f225d71d6fba59e3ca31cd68e420238 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Tue, 23 Jun 2009 09:19:14 +0000 Subject: Merge Bo's libwapcaplet lwc_string_hash_value function and tests. r=dsilvers svn path=/trunk/libwapcaplet/; revision=7927 --- include/libwapcaplet/libwapcaplet.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/libwapcaplet') 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 #include +#include /** * 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_ */ -- cgit v1.2.3