mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
Merge branch 'master' of https://github.com/z3prover/z3
This commit is contained in:
commit
6f6880812b
|
@ -8,6 +8,7 @@
|
||||||
# You should **not** import ``mk_util`` here
|
# You should **not** import ``mk_util`` here
|
||||||
# to avoid having this code depend on the
|
# to avoid having this code depend on the
|
||||||
# of the Python build system.
|
# of the Python build system.
|
||||||
|
import io
|
||||||
import os
|
import os
|
||||||
import pprint
|
import pprint
|
||||||
import logging
|
import logging
|
||||||
|
@ -622,7 +623,7 @@ def mk_gparams_register_modules_internal(h_files_full_path, path):
|
||||||
reg_mod_descr_pat = re.compile('[ \t]*REG_MODULE_DESCRIPTION\(\'([^\']*)\', *\'([^\']*)\'\)')
|
reg_mod_descr_pat = re.compile('[ \t]*REG_MODULE_DESCRIPTION\(\'([^\']*)\', *\'([^\']*)\'\)')
|
||||||
for h_file in sorted_headers_by_component(h_files_full_path):
|
for h_file in sorted_headers_by_component(h_files_full_path):
|
||||||
added_include = False
|
added_include = False
|
||||||
with open(h_file, 'r') as fin:
|
with io.open(h_file, encoding='utf-8', mode='r') as fin:
|
||||||
for line in fin:
|
for line in fin:
|
||||||
m = reg_pat.match(line)
|
m = reg_pat.match(line)
|
||||||
if m:
|
if m:
|
||||||
|
@ -696,7 +697,7 @@ def mk_install_tactic_cpp_internal(h_files_full_path, path):
|
||||||
for h_file in sorted_headers_by_component(h_files_full_path):
|
for h_file in sorted_headers_by_component(h_files_full_path):
|
||||||
added_include = False
|
added_include = False
|
||||||
try:
|
try:
|
||||||
with open(h_file, 'r') as fin:
|
with io.open(h_file, encoding='utf-8', mode='r') as fin:
|
||||||
for line in fin:
|
for line in fin:
|
||||||
if tactic_pat.match(line):
|
if tactic_pat.match(line):
|
||||||
if not added_include:
|
if not added_include:
|
||||||
|
@ -764,7 +765,7 @@ def mk_mem_initializer_cpp_internal(h_files_full_path, path):
|
||||||
finalizer_pat = re.compile('[ \t]*ADD_FINALIZER\(\'([^\']*)\'\)')
|
finalizer_pat = re.compile('[ \t]*ADD_FINALIZER\(\'([^\']*)\'\)')
|
||||||
for h_file in sorted_headers_by_component(h_files_full_path):
|
for h_file in sorted_headers_by_component(h_files_full_path):
|
||||||
added_include = False
|
added_include = False
|
||||||
with open(h_file, 'r') as fin:
|
with io.open(h_file, encoding='utf-8', mode='r') as fin:
|
||||||
for line in fin:
|
for line in fin:
|
||||||
m = initializer_pat.match(line)
|
m = initializer_pat.match(line)
|
||||||
if m:
|
if m:
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#
|
#
|
||||||
# Author: Leonardo de Moura (leonardo)
|
# Author: Leonardo de Moura (leonardo)
|
||||||
############################################
|
############################################
|
||||||
|
import io
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -806,7 +807,7 @@ def extract_c_includes(fname):
|
||||||
# We should generate and error for any occurrence of #include that does not match the previous pattern.
|
# We should generate and error for any occurrence of #include that does not match the previous pattern.
|
||||||
non_std_inc_pat = re.compile(".*#include.*")
|
non_std_inc_pat = re.compile(".*#include.*")
|
||||||
|
|
||||||
f = open(fname, 'r')
|
f = io.open(fname, encoding='utf-8', mode='r')
|
||||||
linenum = 1
|
linenum = 1
|
||||||
for line in f:
|
for line in f:
|
||||||
m1 = std_inc_pat.match(line)
|
m1 = std_inc_pat.match(line)
|
||||||
|
|
Loading…
Reference in a new issue