khash: Move string hash functions to own header/source file
Unlike khash they shouldn't be phased out (only renamed).
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2002-2013, Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#ifndef _KERNEL_UTIL_STRING_HASH_H
|
||||
#define _KERNEL_UTIL_STRING_HASH_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
uint32 hash_hash_string(const char* string);
|
||||
uint32 hash_hash_string_part(const char* string, size_t maxLength);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* _KERNEL_UTIL_STRING_HASH_H */
|
||||
@@ -9,7 +9,8 @@
|
||||
#define _KERNEL_UTIL_KHASH_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
#include <util/StringHash.h>
|
||||
|
||||
|
||||
// The use of offsetof() on non-PODs is invalid. Since many structs use
|
||||
// templated members (i.e. DoublyLinkedList) which makes them non-PODs we
|
||||
@@ -60,9 +61,6 @@ void hash_dump_table(struct hash_table* table);
|
||||
* the key, returning 0 if equal, other if not
|
||||
*/
|
||||
|
||||
uint32 hash_hash_string(const char *string);
|
||||
uint32 hash_hash_string_part(const char *string, size_t maxLength);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user