Commit 06e7073c authored by Stefan Behnel's avatar Stefan Behnel

Merge branch '0.29.x'

parents b1ae57ba 4a789966
...@@ -4,8 +4,12 @@ ...@@ -4,8 +4,12 @@
from __future__ import absolute_import from __future__ import absolute_import
<<<<<<< HEAD
import hashlib import hashlib
=======
>>>>>>> 0.29.x
import copy import copy
import hashlib
import re import re
try: try:
...@@ -5032,5 +5036,5 @@ def type_identifier_from_declaration(decl): ...@@ -5032,5 +5036,5 @@ def type_identifier_from_declaration(decl):
def cap_length(s, max_prefix=63, max_len=1024): def cap_length(s, max_prefix=63, max_len=1024):
if len(s) <= max_prefix: if len(s) <= max_prefix:
return s return s
hash_prefix = hashlib.sha1(s.encode('ascii')).hexdigest()[:6] hash_prefix = hashlib.sha256(s.encode('ascii')).hexdigest()[:6]
return '%s__%s__etc' % (hash_prefix, s[:max_len-17]) return '%s__%s__etc' % (hash_prefix, s[:max_len-17])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment