-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/perf_test
- Loading branch information
Showing
3 changed files
with
31 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -479,30 +479,19 @@ MMH3Hasher32_get_name(PyObject *self, void *closure) | |
} | ||
|
||
static PyGetSetDef MMH3Hasher32_getsetters[] = { | ||
{"digest_size", (getter)MMH3Hasher32_get_digest_size, NULL, NULL, NULL}, | ||
{"block_size", (getter)MMH3Hasher32_get_block_size, NULL, NULL, NULL}, | ||
{"name", (getter)MMH3Hasher32_get_name, NULL, NULL, NULL}, | ||
{"digest_size", (getter)MMH3Hasher32_get_digest_size, NULL, | ||
"number of bytes in this hashes output", NULL}, | ||
{"block_size", (getter)MMH3Hasher32_get_block_size, NULL, | ||
"number of bytes of the internal block of this algorithm", NULL}, | ||
{"name", (getter)MMH3Hasher32_get_name, NULL, | ||
"the hash algorithm being used by this object", NULL}, | ||
{NULL} /* Sentinel */ | ||
}; | ||
|
||
PyDoc_STRVAR( | ||
MMH3Hasher32Type_doc, | ||
"An mmh3_32 is an object used to calculate the murmurhash3_x86_32 hash\n" | ||
"of a string of information.\n" | ||
"\n" | ||
"Methods:\n" | ||
"\n" | ||
"update(input) -- updates the current digest with an additional string\n" | ||
"digest() -- return the current digest value\n" | ||
"sintdigest() -- return the current digest as a 32 bit signed integer\n" | ||
"uintdigest() -- return the current digest as a 32 bit unsigned integer\n" | ||
"copy() -- return a copy of the current object\n" | ||
"\n" | ||
"Attributes:\n" | ||
"\n" | ||
"name -- the hash algorithm being used by this object\n" | ||
"digest_size -- number of bytes in this hashes output\n" | ||
"block_size -- number of bytes of the internal block of this algorithm"); | ||
"of a string of information."); | ||
|
||
static PyTypeObject MMH3Hasher32Type = { | ||
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "mmh3.mmh3_32", | ||
|
@@ -801,35 +790,19 @@ MMH3Hasher128x64_get_name(PyObject *self, void *closure) | |
} | ||
|
||
static PyGetSetDef MMH3Hasher128x64_getsetters[] = { | ||
{"digest_size", (getter)MMH3Hasher128x64_get_digest_size, NULL, NULL, | ||
NULL}, | ||
{"block_size", (getter)MMH3Hasher128x64_get_block_size, NULL, NULL, NULL}, | ||
{"name", (getter)MMH3Hasher128x64_get_name, NULL, NULL, NULL}, | ||
{"digest_size", (getter)MMH3Hasher128x64_get_digest_size, NULL, | ||
"number of bytes in this hashes output", NULL}, | ||
{"block_size", (getter)MMH3Hasher128x64_get_block_size, NULL, | ||
"number of bytes of the internal block of this algorithm", NULL}, | ||
{"name", (getter)MMH3Hasher128x64_get_name, NULL, | ||
"the hash algorithm being used by this object", NULL}, | ||
{NULL} /* Sentinel */ | ||
}; | ||
|
||
PyDoc_STRVAR( | ||
MMH3Hasher128x64Type_doc, | ||
"An mmh3_x64_128 is an object used to calculate the murmurhash3_x64_128\n" | ||
"hash of a string of information.\n" | ||
"\n" | ||
"Methods:\n" | ||
"\n" | ||
"update(input) -- updates the current digest with an additional string\n" | ||
"digest() -- return the current digest value\n" | ||
"sintdigest() -- return the current digest as a 128 bit signed integer\n" | ||
"uintdigest() -- return the current digest as a 128 bit unsigned integer\n" | ||
"stupledigest() -- return the current digest as a tuple of two 64 bit\n" | ||
" signed integers\n" | ||
"utupledigest() -- return the current digest as a tuple of two 64 bit\n" | ||
" unsigned integers\n" | ||
"copy() -- return a copy of the current object\n" | ||
"\n" | ||
"Attributes:\n" | ||
"\n" | ||
"name -- the hash algorithm being used by this object\n" | ||
"digest_size -- number of bytes in this hashes output\n" | ||
"block_size -- number of bytes of the internal block of this algorithm"); | ||
"hash of a string of information."); | ||
|
||
static PyTypeObject MMH3Hasher128x64Type = { | ||
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "mmh3.mmh3_x64_128", | ||
|
@@ -1126,35 +1099,19 @@ MMH3Hasher128x86_get_name(PyObject *self, void *closure) | |
} | ||
|
||
static PyGetSetDef MMH3Hasher128x86_getsetters[] = { | ||
{"digest_size", (getter)MMH3Hasher128x86_get_digest_size, NULL, NULL, | ||
NULL}, | ||
{"block_size", (getter)MMH3Hasher128x86_get_block_size, NULL, NULL, NULL}, | ||
{"name", (getter)MMH3Hasher128x86_get_name, NULL, NULL, NULL}, | ||
{"digest_size", (getter)MMH3Hasher128x86_get_digest_size, NULL, | ||
"number of bytes in this hashes output", NULL}, | ||
{"block_size", (getter)MMH3Hasher128x86_get_block_size, NULL, | ||
"number of bytes of the internal block of this algorithm", NULL}, | ||
{"name", (getter)MMH3Hasher128x86_get_name, NULL, | ||
"the hash algorithm being used by this object", NULL}, | ||
{NULL} /* Sentinel */ | ||
}; | ||
|
||
PyDoc_STRVAR( | ||
MMH3Hasher128x86Type_doc, | ||
"An mmh3_x86_128 is an object used to calculate the murmurhash3_x86_128\n" | ||
"hash of a string of information.\n" | ||
"\n" | ||
"Methods:\n" | ||
"\n" | ||
"update(input) -- updates the current digest with an additional string\n" | ||
"digest() -- return the current digest value\n" | ||
"sintdigest() -- return the current digest as a 128 bit signed integer\n" | ||
"uintdigest() -- return the current digest as a 128 bit unsigned integer\n" | ||
"stupledigest() -- return the current digest as a tuple of two 64 bit\n" | ||
" signed integers\n" | ||
"utupledigest() -- return the current digest as a tuple of two 64 bit\n" | ||
" unsigned integers\n" | ||
"copy() -- return a copy of the current object\n" | ||
"\n" | ||
"Attributes:\n" | ||
"\n" | ||
"name -- the hash algorithm being used by this object\n" | ||
"digest_size -- number of bytes in this hashes output\n" | ||
"block_size -- number of bytes of the internal block of this algorithm"); | ||
"hash of a string of information."); | ||
|
||
static PyTypeObject MMH3Hasher128x86Type = { | ||
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "mmh3.mmh3_x86_128", | ||
|
@@ -1174,13 +1131,15 @@ static PyTypeObject MMH3Hasher128x86Type = { | |
static struct PyModuleDef mmh3module = { | ||
PyModuleDef_HEAD_INIT, | ||
"mmh3", | ||
"mmh3 is a Python front-end to MurmurHash3, " | ||
"a fast and robust hash library " | ||
"created by Austin Appleby (http://code.google.com/p/smhasher/).\n " | ||
"Ported by Hajime Senuma <hajime.senuma@gmail.com>\n" | ||
"Try hash('foobar') or hash('foobar', 1984).\n" | ||
"A Python front-end to MurmurHash3.\n\n" | ||
"A Python front-end to MurmurHash3, " | ||
"a fast and robust non-cryptographic hash library " | ||
"created by Austin Appleby (http://code.google.com/p/smhasher/).\n\n" | ||
"Ported by Hajime Senuma <[email protected]>. " | ||
"If you find any bugs, please submit an issue via " | ||
"https://github.com/hajimes/mmh3", | ||
"https://github.com/hajimes/mmh3.\n\n" | ||
"Typical usage example:\n\n" | ||
" mmh3.hash('foobar', 42)", | ||
-1, | ||
Mmh3Methods, | ||
NULL, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters