summaryrefslogtreecommitdiffstats
path: root/src/python/pysss_murmur.c
Commit message (Collapse)AuthorAgeFilesLines
* pysss_murmur: Fix warning Wsign-compareLukas Slebodnik2016-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | src/python/pysss_murmur.c: In function ‘py_murmurhash3’: src/python/pysss_murmur.c:47:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] key_len > strlen(key)) { ^ uint32_t murmurhash3(const char *key, int len, uint32_t seed) The second argument of the function murmurhash3 has type int. But the code expects to be unsigned integer. There is code in python wrapper py_murmurhash3 which check boundaries of that argument. It should be an unsigned "key_len > INT_MAX || key_len < 0". An exception should be thrown for negative number. Moreover, the length should be shorter then a length of input string. The strlen returns size_t which is unsigned and key_len is signed long. We already checked that value is unsigned so we can safely cast key_len to size_t Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* Python3 support in SSSDBohuslav Kabrda2015-01-131-1/+27
| | | | https://fedorahosted.org/sssd/ticket/2017
* Fix compilation error in Python murmurhash bindingsJakub Hrozek2012-08-161-4/+8
| | | | | | The compilation produced an error due to missing declaration of uint32_t and a couple of warnings caused by different prototypes of argument parsing functions in older Python releases.
* Add python bindings for murmurhash3Sumit Bose2012-08-151-0/+65