diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-05-29 07:51:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-29 07:51:11 +0200 |
commit | 5877863b23a4f4510b6f060287c503a4de61f2a2 (patch) | |
tree | ba038e109deec0ba45aa0fab8e763d98efa548a4 /compat.py | |
parent | 53440ddeec128de3cac7e59853ce0994a8f4214b (diff) | |
parent | 27310974e0598e50f87ed51d34a56953e39a8eb6 (diff) |
Merge pull request #19227 from ibrahn/fix-py3-build
fixed building using scons with python3.
Diffstat (limited to 'compat.py')
-rw-r--r-- | compat.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -16,6 +16,8 @@ if sys.version_info < (3,): return x def iteritems(d): return d.iteritems() + def itervalues(d): + return d.itervalues() def escape_string(s): if isinstance(s, unicode): s = s.encode('ascii') @@ -44,6 +46,8 @@ else: return codecs.utf_8_decode(x)[0] def iteritems(d): return iter(d.items()) + def itervalues(d): + return iter(d.values()) def charcode_to_c_escapes(c): rev_result = [] while c >= 256: |