Hack to stop parsing of problematic CvStatModel::train definition

This commit is contained in:
Andrey Kamaev 2013-02-19 10:39:31 +04:00
parent 0570aa6494
commit 535f1fb2e2

View File

@ -992,6 +992,11 @@ class DefinitionParser(object):
return rv
def _parse_signature(self):
if r'CvStatModel::train' in self.definition:
# hack to skip parsing of problematic definition
self.pos = self.end
return [ArgumentDefExpr("const Mat&", "train_data", None), ArgumentDefExpr(None, self.definition[self.definition.find("["):-1], None)], False, True
self.skip_ws()
if not self.skip_string('('):
self.fail('expected parentheses for function')