*** empty log message ***

This commit is contained in:
Joe Shochet 2001-02-27 20:21:04 +00:00
parent 8f338d05a8
commit d212027cf1
2 changed files with 17 additions and 1 deletions

View File

@ -267,6 +267,8 @@ class FFIMethodArgumentTreeCollection:
self.outputOverloadedMethodFooter(file, nesting) self.outputOverloadedMethodFooter(file, nesting)
class FFIMethodArgumentTree: class FFIMethodArgumentTree:
""" """
Tree is made from nested dictionaries. Tree is made from nested dictionaries.
@ -369,3 +371,16 @@ class FFIMethodArgumentTree:
indent(file, 0, ('<' + name + '> ')) indent(file, 0, ('<' + name + '> '))
indent(file, 0, "'\n") indent(file, 0, "'\n")
def isSinglePath(self):
if (len(self.tree.keys()) > 1):
# More than one child, return false
return 0
else:
# Only have one child, see if he only has one child
key = self.tree.keys()[0]
tree = self.tree[key][0]
if tree:
return tree.isSinglePath()
else:
return self.tree[key][1]

View File

@ -332,7 +332,8 @@ class MethodSpecification(FunctionSpecification):
# The method body will look something like # The method body will look something like
# panda.Class_destructor(self.this) # panda.Class_destructor(self.this)
self.outputCFunctionComment(file, nesting+2) self.outputCFunctionComment(file, nesting+2)
indent(file, nesting+2, self.typeDescriptor.moduleName + '.' indent(file, nesting+2, 'if ' + self.typeDescriptor.moduleName + ':\n')
indent(file, nesting+3, self.typeDescriptor.moduleName + '.'
+ self.typeDescriptor.wrapperName + '(self.this)\n') + self.typeDescriptor.wrapperName + '(self.this)\n')
def outputDestructorFooter(self, methodClass, file, nesting): def outputDestructorFooter(self, methodClass, file, nesting):