We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96b8363 commit 5ce4b88Copy full SHA for 5ce4b88
sciencemode/_cffi.py
@@ -246,7 +246,9 @@ def visit_FuncDecl(self, node):
246
247
defines = set()
248
for header_path in HEADERS:
249
- with open(os.sep.join([include_dir, header_path]), "r") as header_file:
+ with open(
250
+ os.sep.join([include_dir, header_path]), "r", encoding="utf-8"
251
+ ) as header_file:
252
header = header_file.read()
253
for match in DEFINE_PATTERN.finditer(header):
254
if (
@@ -292,6 +294,5 @@ def visit_FuncDecl(self, node):
292
294
293
295
# Optional: save for debugging
296
if False:
- file = open("sciencemode.cdef", "w")
- file.write(cdef)
297
- file.close()
+ with open("sciencemode.cdef", "w", encoding="utf-8") as file:
298
+ file.write(cdef)
0 commit comments