1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-20 14:45:44 +00:00

fixed building using scons with python3

I broke python 3 builds by using py2 specific dict functions in
commit 98846b39ee
Fixed with functions in compat.py
This commit is contained in:
Ibrahn Sahir
2018-05-28 18:41:16 +01:00
parent 38284bc6da
commit 27310974e0
2 changed files with 8 additions and 4 deletions

View File

@@ -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: