Skip to content

Commit

Permalink
Enhance hash_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimes committed Sep 5, 2024
1 parent 7baa944 commit 9660b9e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/mmh3/mmh3module.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ mmh3_hash_bytes(PyObject *self, PyObject *args, PyObject *keywds)
result[1] = bswap_64(result[1]);
#endif

char bytes[MMH3_128_DIGESTSIZE];
memcpy(bytes, result, MMH3_128_DIGESTSIZE);
return PyBytes_FromStringAndSize(bytes, MMH3_128_DIGESTSIZE);
return PyBytes_FromStringAndSize((char *)result, MMH3_128_DIGESTSIZE);
}

static PyMethodDef Mmh3Methods[] = {
Expand Down

0 comments on commit 9660b9e

Please sign in to comment.