Enable the binding generator to parse shadow files

This commit is contained in:
Hamdi Sahloul
2018-08-25 07:18:33 +09:00
parent 90f47eb952
commit 7cdb0eafeb
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -1019,7 +1019,8 @@ class PythonWrapperGenerator(object):
decls = self.parser.parse(hdr)
if len(decls) == 0:
continue
self.code_include.write( '#include "{0}"\n'.format(hdr[hdr.rindex('opencv2/'):]) )
if hdr.find('opencv2/') >= 0: #Avoid including the shadow files
self.code_include.write( '#include "{0}"\n'.format(hdr[hdr.rindex('opencv2/'):]) )
for decl in decls:
name = decl[0]
if name.startswith("struct") or name.startswith("class"):