Skip to content

Commit ed9d64c

Browse files
committed
Fix python re warning in gen_objc
1 parent 646e87c commit ed9d64c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/objc/generator/gen_objc.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ def gen_func(self, ci, fi, extension_implementations, extension_signatures):
11201120
name = line[p0:p1]
11211121
for arg in args:
11221122
if arg.name == name:
1123-
toWrite.append(re.sub('\*\s*@param ', '* @param ', line))
1123+
toWrite.append(re.sub(r'\*\s*@param ', '* @param ', line))
11241124
break
11251125
else:
11261126
s0 = line.find("@see")
@@ -1512,13 +1512,13 @@ def escape_underscore(str):
15121512
return str.replace('_', '\\_')
15131513

15141514
def escape_texttt(str):
1515-
return re.sub(re.compile('texttt{(.*?)\}', re.DOTALL), lambda x: 'texttt{' + escape_underscore(x.group(1)) + '}', str)
1515+
return re.sub(re.compile('texttt{(.*?)}', re.DOTALL), lambda x: 'texttt{' + escape_underscore(x.group(1)) + '}', str)
15161516

15171517
def get_macros(tex):
15181518
out = ""
1519-
if re.search("\\\\fork\s*{", tex):
1519+
if re.search(r"\\fork\s*{", tex):
15201520
out += "\\newcommand{\\fork}[4]{ \\left\\{ \\begin{array}{l l} #1 & \\text{#2}\\\\\\\\ #3 & \\text{#4}\\\\\\\\ \\end{array} \\right.} "
1521-
if re.search("\\\\vecthreethree\s*{", tex):
1521+
if re.search(r"\\vecthreethree\s*{", tex):
15221522
out += "\\newcommand{\\vecthreethree}[9]{ \\begin{bmatrix} #1 & #2 & #3\\\\\\\\ #4 & #5 & #6\\\\\\\\ #7 & #8 & #9 \\end{bmatrix} } "
15231523
return out
15241524

0 commit comments

Comments
 (0)