projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4676eec
)
encode code to bytes before hashing it
author
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 10 Aug 2013 08:28:45 +0000
(10:28 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 10 Aug 2013 08:28:45 +0000
(10:28 +0200)
Cython/Compiler/Code.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/Code.py
b/Cython/Compiler/Code.py
index
2a0213c
..
4577c55
100644
(file)
--- a/
Cython/Compiler/Code.py
+++ b/
Cython/Compiler/Code.py
@@
-1542,7
+1542,7
@@
class CCodeWriter(object):
include_dir = self.globalstate.common_utility_include_dir
if include_dir and len(code) > 1024:
include_file = "%s_%s.h" % (
- name, hashlib.md5(code).hexdigest())
+ name, hashlib.md5(code
.encode('utf8')
).hexdigest())
path = os.path.join(include_dir, include_file)
if not os.path.exists(path):
tmp_path = '%s.tmp%s' % (path, os.getpid())