mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge branch 4.x
This commit is contained in:
@@ -1121,7 +1121,7 @@ class ObjectiveCWrapperGenerator(object):
|
||||
name = line[p0:p1]
|
||||
for arg in args:
|
||||
if arg.name == name:
|
||||
toWrite.append(re.sub('\*\s*@param ', '* @param ', line))
|
||||
toWrite.append(re.sub(r'\*\s*@param ', '* @param ', line))
|
||||
break
|
||||
else:
|
||||
s0 = line.find("@see")
|
||||
@@ -1513,13 +1513,13 @@ def escape_underscore(str):
|
||||
return str.replace('_', '\\_')
|
||||
|
||||
def escape_texttt(str):
|
||||
return re.sub(re.compile('texttt{(.*?)\}', re.DOTALL), lambda x: 'texttt{' + escape_underscore(x.group(1)) + '}', str)
|
||||
return re.sub(re.compile('texttt{(.*?)}', re.DOTALL), lambda x: 'texttt{' + escape_underscore(x.group(1)) + '}', str)
|
||||
|
||||
def get_macros(tex):
|
||||
out = ""
|
||||
if re.search("\\\\fork\s*{", tex):
|
||||
if re.search(r"\\fork\s*{", tex):
|
||||
out += "\\newcommand{\\fork}[4]{ \\left\\{ \\begin{array}{l l} #1 & \\text{#2}\\\\\\\\ #3 & \\text{#4}\\\\\\\\ \\end{array} \\right.} "
|
||||
if re.search("\\\\vecthreethree\s*{", tex):
|
||||
if re.search(r"\\vecthreethree\s*{", tex):
|
||||
out += "\\newcommand{\\vecthreethree}[9]{ \\begin{bmatrix} #1 & #2 & #3\\\\\\\\ #4 & #5 & #6\\\\\\\\ #7 & #8 & #9 \\end{bmatrix} } "
|
||||
return out
|
||||
|
||||
@@ -1663,7 +1663,9 @@ if __name__ == "__main__":
|
||||
h_files += [os.path.join(root, filename) for filename in fnmatch.filter(filenames, '*.h')]
|
||||
hpp_files += [os.path.join(root, filename) for filename in fnmatch.filter(filenames, '*.hpp')]
|
||||
srcfiles = h_files + hpp_files
|
||||
srcfiles = [f for f in srcfiles if not re_bad.search(f.replace('\\', '/'))]
|
||||
# Use relative paths to avoid being affected by the name of the parent directory.
|
||||
# See https://github.com/opencv/opencv/issues/26712
|
||||
srcfiles = [f for f in srcfiles if not re_bad.search(os.path.relpath(f, module_location).replace('\\', '/'))]
|
||||
logging.info("\nFiles (%d):\n%s", len(srcfiles), pformat(srcfiles))
|
||||
|
||||
common_headers_fname = os.path.join(misc_location, 'filelist_common')
|
||||
|
||||
Reference in New Issue
Block a user