[Python-checkins] cpython: Avoid compiler warning due to stray \x00
antoine.pitrou
python-checkins at python.org
Mon Apr 16 18:32:07 CEST 2012
http://hg.python.org/cpython/rev/e97ead910cc1
changeset: 76357:e97ead910cc1
user: Antoine Pitrou <solipsis at pitrou.net>
date: Mon Apr 16 18:30:54 2012 +0200
summary:
Avoid compiler warning due to stray \x00
files:
Python/freeze_importlib.py | 4 ++--
Python/importlib.h | Bin
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Python/freeze_importlib.py b/Python/freeze_importlib.py
--- a/Python/freeze_importlib.py
+++ b/Python/freeze_importlib.py
@@ -22,9 +22,9 @@
line.append('%d,' % c)
lines.append(''.join(line))
lines.append('};\n')
- with open(output_path, 'w') as output_file:
+ with open(output_path, 'w', encoding='utf-8') as output_file:
output_file.write('\n'.join(lines))
- output_file.write('\u0000')
+ output_file.write('/* Mercurial binary marker: \x00 */')
if __name__ == '__main__':
diff --git a/Python/importlib.h b/Python/importlib.h
index f11dcbb131c5f7b77075b5d4c0523e52f33a1c6b..3a03c462530658669296e8e99237c26924ff24b7
GIT binary patch
[stripped]
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list