mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55:51 +00:00
Reorganizing source code. Created util dir
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
630ba0c675
commit
2c464d413d
153 changed files with 0 additions and 0 deletions
34
src/util/str_hashtable.h
Normal file
34
src/util/str_hashtable.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
str_hashtable.h
|
||||
|
||||
Abstract:
|
||||
|
||||
String hashtable. It uses Jenkin's hash function and the optimized hashtable module.
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2006-09-13.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _STR_HASHTABLE_H_
|
||||
#define _STR_HASHTABLE_H_
|
||||
|
||||
#include<string.h>
|
||||
|
||||
#include"hashtable.h"
|
||||
#include"hash.h"
|
||||
|
||||
struct str_hash_proc {
|
||||
unsigned operator()(char const * s) const { return string_hash(s, static_cast<unsigned>(strlen(s)), 17); }
|
||||
};
|
||||
struct str_eq_proc { bool operator()(char const * s1, char const * s2) const { return strcmp(s1, s2) == 0; } };
|
||||
typedef ptr_hashtable<char, str_hash_proc, str_eq_proc> str_hashtable;
|
||||
|
||||
#endif /* _STR_HASHTABLE_H_ */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue