diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-09 11:00:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 11:00:14 +0200 |
commit | 30a4882cf808f04a80bf0b6a3c879c8e9a74f673 (patch) | |
tree | a149b8dde4c72fe0251064925de2a549b3c7b3c5 /modules/mono/SCsub | |
parent | e4dc1f93d279f1dea1a9b8a545d54c87422d00d3 (diff) | |
parent | a6b48c170696b2a659b8809f24cc564ec8d73489 (diff) |
Merge pull request #11910 from hoelzl/pr-python3-mono-build
Fix Python 3 incompatibility in Mono build
Diffstat (limited to 'modules/mono/SCsub')
-rw-r--r-- | modules/mono/SCsub | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/mono/SCsub b/modules/mono/SCsub index 0af2056c5c..caf4fdb3ca 100644 --- a/modules/mono/SCsub +++ b/modules/mono/SCsub @@ -2,9 +2,10 @@ Import('env') +from compat import byte_to_str def make_cs_files_header(src, dst): - with open(dst, 'wb') as header: + with open(dst, 'w') as header: header.write('/* This is an automatically generated file; DO NOT EDIT! OK THX */\n') header.write('#ifndef _CS_FILES_DATA_H\n') header.write('#define _CS_FILES_DATA_H\n\n') @@ -26,7 +27,7 @@ def make_cs_files_header(src, dst): for i, buf_idx in enumerate(range(len(buf))): if i > 0: header.write(', ') - header.write(str(ord(buf[buf_idx]))) + header.write(byte_to_str(buf[buf_idx])) inserted_files += '\tr_files.insert(\"' + file + '\", ' \ 'CompressedFile(_cs_' + name + '_compressed_size, ' \ '_cs_' + name + '_uncompressed_size, ' \ |