Permalink
Browse files

Some py3 compatability

  • Loading branch information...
1 parent 9e83a79 commit 31ca4a04410975f00a6ef1922f931749caa00f3f @markflorisson committed Apr 3, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 extensibletype/methodtable.pyx
@@ -50,6 +50,9 @@ cdef class Hasher(object):
cdef uint64_t hashvalue
# cdef bytes md5 = hashlib.md5(signature).digest()
# (&hashvalue)[0] = (<uint64_t *> <char *> md5)[0]
+ if isinstance(signature, str):
+ # Python 3
+ signature = signature.encode("ascii")
hashvalue = intern.global_intern(signature)
return hashvalue

0 comments on commit 31ca4a0

Please sign in to comment.