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

@@ -215,9 +215,11 @@ class ClassInfo(object):
if decl:
self.bases = decl[1].split()[1:]
if len(self.bases) > 1:
print "Error: class %s has more than 1 base class (not supported by Python C extensions)" % (self.name,)
print "Warning: class %s has more than 1 base class (not supported by Python C extensions)" % (self.name,)
print "Bases: ", self.bases
return sys.exit(-1)
print "Only the first base class will be used"
self.bases = self.bases[:1]
#return sys.exit(-1)
for m in decl[2]:
if m.startswith("="):
self.wname = m[1:]