]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Avoid compiler warning due to stray \x00
authorAntoine Pitrou <solipsis@pitrou.net>
Mon, 16 Apr 2012 16:30:54 +0000 (18:30 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Mon, 16 Apr 2012 16:30:54 +0000 (18:30 +0200)
Python/freeze_importlib.py
Python/importlib.h

index 9cce0b1e7a45c92ba18be096dd6927d327502447..c012722a42b94fa43c4c2e02aaf4ad05f9df2365 100644 (file)
@@ -22,9 +22,9 @@ def main(input_path, output_path):
             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__':
index f11dcbb131c5f7b77075b5d4c0523e52f33a1c6b..3a03c462530658669296e8e99237c26924ff24b7 100644 (file)
@@ -3107,4 +3107,4 @@ unsigned char _Py_M__importlib[] = {
     13,12,9,12,15,12,17,15,2,6,2,12,41,18,25,12,
     23,12,15,24,34,12,45,
 };
-\0
\ No newline at end of file
+/* Mercurial binary marker: \0 */
\ No newline at end of file