summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-04 09:13:41 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-01-04 09:13:41 +0000
commit003b2511ab0430d43aa0bc8007b7994e5932feb2 (patch)
tree1997bc13926b7b85c3e00eb6213c42f98fc50604
parentade4c7ed11aa1e997930a0231d1954fd81109ca8 (diff)
downloadlasso-003b2511ab0430d43aa0bc8007b7994e5932feb2.tar.gz
lasso-003b2511ab0430d43aa0bc8007b7994e5932feb2.tar.xz
lasso-003b2511ab0430d43aa0bc8007b7994e5932feb2.zip
Bindings: do not stop on failing to parse a declaration, but skip the function and print a warning
-rw-r--r--bindings/bindings.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bindings/bindings.py b/bindings/bindings.py
index eaa69a37..d168e50f 100644
--- a/bindings/bindings.py
+++ b/bindings/bindings.py
@@ -470,12 +470,13 @@ def parse_header(header_file):
if arg == 'void' or arg == '':
continue
m = re.match(r'(.*(?:\s|\*))(\w+)', arg)
- type, name = m.groups()
- type = clean_type(type)
if m:
+ type, name = m.groups()
+ type = clean_type(type)
f.args.append(list((type, name, {})))
else:
print >>sys.stderr, 'failed to process:', arg, 'in line:', line
+ f.skip = True
f.apply_overrides()
if not f.skip:
binding.functions.append(f)