adjust the header parser to support "public virtual" construction and make a tweak for multiple inheritance, fix potential memory problem with Python's IplImage.tostring() method (ticket #1486)

This commit is contained in:
Vadim Pisarevsky
2012-01-25 13:25:35 +00:00
parent c86c6a028c
commit d1b5f43700
3 changed files with 13 additions and 40 deletions

View File

@@ -235,7 +235,7 @@ class CppHeaderParser(object):
modlist.append("=" + macro_arg)
l = l[:npos] + l[npos3+1:]
l = self.batch_replace(l, [("CV_EXPORTS_W", ""), ("CV_EXPORTS", ""), ("public ", " "), ("::", ".")]).strip()
l = self.batch_replace(l, [("CV_EXPORTS_W", ""), ("CV_EXPORTS", ""), ("public virtual ", " "), ("public ", " "), ("::", ".")]).strip()
ll = re.split(r'\s*[,:]?\s*', l)
ll = [le for le in ll if le]
classname = ll[1]