projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deaf39e
)
gen_external.py : relax a bit parsing of preprocessor code -> one line per {} block...
author
Martin Hermant
<martin.hermant@gmail.com>
Mon, 29 May 2017 17:28:48 +0000
(13:28 -0400)
committer
Martin Hermant
<martin.hermant@gmail.com>
Mon, 29 May 2017 17:28:48 +0000
(13:28 -0400)
python/lib/gen_external.py
patch
|
blob
|
history
diff --git
a/python/lib/gen_external.py
b/python/lib/gen_external.py
index
702b6fd
..
9df8f4b
100644
(file)
--- a/
python/lib/gen_external.py
+++ b/
python/lib/gen_external.py
@@
-108,10
+108,13
@@
def get_cpp_objects(header=header, usedouble=False):
i = 1
while 1:
- if i >= len(cpp_output):
break
- if
cpp_output[i-1].endswith(',') or cpp_output[i-1].endswith('{') or cpp_output[i].startswith('}'
):
+ if i >= len(cpp_output):break
+ if
('{' in cpp_output[i - 1]) and (not '}' in cpp_output[i - 1]) or (not ';' in cpp_output[i - 1]
):
cpp_output[i] = cpp_output[i-1] + ' ' + cpp_output[i]
cpp_output.pop(i-1)
+ elif ('}' in cpp_output[i]):
+ cpp_output[i] = cpp_output[i - 1] + ' ' + cpp_output[i]
+ cpp_output.pop(i - 1)
else:
i += 1