projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71c0d2f
)
[py] fix regex not using raw string (closes gh-416, thanks to @PinkSerenity)
author
Pink Serenity
<pink_serenity@outlook.de>
Mon, 24 Feb 2025 08:28:18 +0000
(09:28 +0100)
committer
Paul Brossier
<piem@piem.org>
Sat, 15 Nov 2025 11:23:30 +0000
(12:23 +0100)
python/lib/gen_code.py
patch
|
blob
|
history
diff --git
a/python/lib/gen_code.py
b/python/lib/gen_code.py
index
be7fec6
..
95b9fa5
100644
(file)
--- a/
python/lib/gen_code.py
+++ b/
python/lib/gen_code.py
@@
-109,7
+109,7
@@
def get_name(proto):
def get_return_type(proto):
import re
- paramregex = re.compile('(\w+ ?\*?).*')
+ paramregex = re.compile(
r
'(\w+ ?\*?).*')
outputs = paramregex.findall(proto)
assert len(outputs) == 1
return outputs[0].replace(' ', '')
@@
-140,7
+140,7
@@
def get_params(proto):
returns: ['int argc', 'char ** argv']
"""
import re
- paramregex = re.compile('.*\((.*)\);')
+ paramregex = re.compile(
r
'.*\((.*)\);')
a = paramregex.findall(proto)[0].split(', ')
#a = [i.replace('const ', '') for i in a]
return a