Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Might have fixed crypto lib issue? Refs #22

  • Loading branch information...
commit be40e8cfc19f74e900ade94f220fddb247e9efbd 1 parent 93621b8
Michael Axiak authored
4 CHANGELOG
View
@@ -1,3 +1,7 @@
+0.3.6 2012-10-21)
+ - Minor cosmetic changes to reduce noise in clang. Might have fixed
+ cryptolib linking error. [BUG]
+
0.3.6 2012-09-04)
- Fixed memory leak in SHA512 computation. Thanks pbutler! [BUG]
5 setup.py
View
@@ -40,7 +40,8 @@
sys.argv.remove('--cython')
ext_modules = [Extension("pybloomfilter",
- ext_files)]
+ ext_files,
+ libraries=['crypto'])]
requirements = []
@@ -49,7 +50,7 @@
setup(
name = 'pybloomfiltermmap',
- version = "0.3.6",
+ version = "0.3.8",
author = "Michael Axiak, Rob Stacey",
author_email = "mike@axiak.net",
url = "http://github.com/axiak/pybloomfiltermmap/",
6 src/bloomfilter.c
View
@@ -173,15 +173,13 @@ CODE TO USE SHA512..
uint32_t _hash_char(uint32_t hash_seed, Key * key) {
EVP_MD_CTX ctx;
unsigned char result_buffer[64];
- uint32_t result = 0;
- unsigned int result_size = sizeof(result);
EVP_MD_CTX_init(&ctx);
EVP_DigestInit_ex(&ctx, EVP_sha512(), NULL);
EVP_DigestUpdate(&ctx, (const unsigned char *)&hash_seed, sizeof(hash_seed));
EVP_DigestUpdate(&ctx, (const unsigned char *)key->shash, key->nhash);
- EVP_DigestFinal_ex(&ctx, &result_buffer, NULL);
+ EVP_DigestFinal_ex(&ctx, (unsigned char *)&result_buffer, NULL);
EVP_MD_CTX_cleanup(&ctx);
return *(uint32_t *)result_buffer;
}
@@ -202,7 +200,7 @@ uint32_t _hash_char(uint32_t hash_seed, Key * key) {
}
-/* Code for SuperFast * /
+/ * Code for SuperFast * /
#include "superfast.h"
uint32_t _hash_char(uint32_t hash_seed, Key * key) {
return SuperFastHash(key->shash, key->nhash, hash_seed);
6 src/mmapbitarray.c
View
@@ -84,7 +84,7 @@ MBArray * mbarray_Create_Mmap(BTYPE num_bits, const char * file, const char * he
fheaderlen = mbarray_HeaderLen(array);
errno = 0;
- if (fheaderlen >= 0 && !(oflag && O_CREAT) && fheaderlen != header_len) {
+ if (fheaderlen >= 0 && !(oflag & O_CREAT) && fheaderlen != header_len) {
errno = EINVAL;
mbarray_Destroy(array);
return NULL;
@@ -111,7 +111,7 @@ MBArray * mbarray_Create_Mmap(BTYPE num_bits, const char * file, const char * he
array->size = (size_t)ceil((double)num_bits / sizeof(DTYPE) / 8.0);
array->bytes = (size_t)ceil((double)num_bits / 8.0);
- if (filesize < 0) {
+ if (filesize <= 0) {
mbarray_Destroy(array);
return NULL;
}
@@ -425,7 +425,7 @@ static inline int _filesize(int fd)
return -1;
}
- return buffer.st_size;
+ return (int)buffer.st_size;
}
uint64_t _get_num_bits(int fd) {
2  src/pybloomfilter.pyx
View
@@ -1,4 +1,4 @@
-VERSION = (0, 3, 6)
+VERSION = (0, 3, 8)
AUTHOR = "Michael Axiak"
__VERSION__ = VERSION
Please sign in to comment.
Something went wrong with that request. Please try again.