diff --git a/pyste/src/Pyste/CppParser.py b/pyste/src/Pyste/CppParser.py index eb5e32c3..4ec72eae 100644 --- a/pyste/src/Pyste/CppParser.py +++ b/pyste/src/Pyste/CppParser.py @@ -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) diff --git a/pyste/src/Pyste/declarations.py b/pyste/src/Pyste/declarations.py index 2d61e015..3edea834 100644 --- a/pyste/src/Pyste/declarations.py +++ b/pyste/src/Pyste/declarations.py @@ -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