Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
a36b1fe8
Commit
a36b1fe8
authored
11 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Patches
Plain Diff
Clear assoc.h from unused hash definitions.
parent
0d2be495
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/assoc.h
+1
-54
1 addition, 54 deletions
include/assoc.h
with
1 addition
and
54 deletions
include/assoc.h
+
1
−
54
View file @
a36b1fe8
...
...
@@ -26,9 +26,7 @@
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include
<pickle.h>
#include
<string.h>
#include
<stdlib.h>
#include
<stdint.h>
#if !MH_SOURCE
#define MH_UNDEF
...
...
@@ -49,54 +47,3 @@ struct mh_i32ptr_node_t {
#define mh_eq(a, b, arg) ((a->key) == (b->key))
#include
<mhash.h>
/*
* Map: (i64) => (void *)
*/
#define mh_name _i64ptr
struct
mh_i64ptr_node_t
{
uint64_t
key
;
void
*
val
;
};
#define mh_node_t struct mh_i64ptr_node_t
#define mh_int_t uint32_t
#define mh_arg_t void *
#define mh_hash(a, arg) ((uint32_t)((a->key)>>33^(a->key)^(a->key)<<11))
#define mh_eq(a, b, arg) ((a->key) == (b->key))
#include
<mhash.h>
/*
* Map: (char *) => (void *)
*/
static
inline
int
lstrcmp
(
const
char
*
a
,
const
char
*
b
)
{
unsigned
int
al
,
bl
;
al
=
load_varint32
(
&
a
);
bl
=
load_varint32
(
&
b
);
if
(
al
!=
bl
)
return
bl
-
al
;
return
memcmp
(
a
,
b
,
al
);
}
#include
<third_party/PMurHash.h>
#define mh_name _lstrptr
struct
mh_lstrptr_node_t
{
const
char
*
key
;
void
*
val
;
};
#define mh_node_t struct mh_lstrptr_node_t
#define mh_int_t uint32_t
#define mh_arg_t void *
static
inline
uint32_t
mh_strptr_hash
(
const
mh_node_t
*
a
,
mh_arg_t
arg
)
{
(
void
)
arg
;
const
char
*
_k
=
a
->
key
;
const
uint32_t
l
=
load_varint32
(
&
_k
);
return
PMurHash32
(
13
,
_k
,
l
);
}
#define mh_hash(a, arg) mh_strptr_hash(a, arg)
#define mh_eq(a, b, arg) (lstrcmp(a->key, b->key) == 0)
#include
<mhash.h>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment