mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 05:42:30 +00:00
- Fixed bug with exception declarations
[SVN r22459]
This commit is contained in:
@@ -130,9 +130,10 @@ class CppParser:
|
||||
return declarations
|
||||
finally:
|
||||
if settings.DEBUG and os.path.isfile(xmlfile):
|
||||
filename = os.path.basename(header)
|
||||
filename = os.path.splitext(filename)[0] + '.xml'
|
||||
shutil.copy(xmlfile, filename)
|
||||
debugname = os.path.basename(header)
|
||||
debugname = os.path.splitext(debugname)[0] + '.xml'
|
||||
print 'DEBUG:', debugname
|
||||
shutil.copy(xmlfile, debugname)
|
||||
# delete the temporary files
|
||||
try:
|
||||
os.remove(xmlfile)
|
||||
|
||||
@@ -223,7 +223,7 @@ class Function(Declaration):
|
||||
if self.throws is None:
|
||||
return ""
|
||||
else:
|
||||
return " throw(%s)" % ', '.join (self.throws)
|
||||
return " throw(%s)" % ', '.join ([x.FullName() for x in self.throws])
|
||||
|
||||
|
||||
def PointerDeclaration(self, force=False):
|
||||
@@ -236,7 +236,7 @@ class Function(Declaration):
|
||||
else:
|
||||
result = self.result.FullName()
|
||||
params = ', '.join([x.FullName() for x in self.parameters])
|
||||
return '(%s (*)(%s))&%s' % (result, params, self.FullName())
|
||||
return '(%s (*)(%s)%s)&%s' % (result, params, self.Exceptions(), self.FullName())
|
||||
|
||||
|
||||
def MinArgs(self):
|
||||
@@ -346,7 +346,7 @@ class Constructor(Method):
|
||||
param = self.parameters[0]
|
||||
class_as_param = self.parameters[0].name == self.class_
|
||||
param_reference = isinstance(param, ReferenceType)
|
||||
is_public = self.visibility = Scope.public
|
||||
is_public = self.visibility == Scope.public
|
||||
return param_reference and class_as_param and param.const and is_public
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user