diff options
-rw-r--r-- | Tools/bgen/bgen/bgenGenerator.py | 2 | ||||
-rw-r--r-- | Tools/bgen/bgen/bgenObjectDefinition.py | 2 | ||||
-rw-r--r-- | Tools/bgen/bgen/bgenType.py | 16 | ||||
-rw-r--r-- | Tools/bgen/bgen/bgenVariable.py | 2 | ||||
-rw-r--r-- | Tools/bgen/bgen/scantools.py | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/Tools/bgen/bgen/bgenGenerator.py b/Tools/bgen/bgen/bgenGenerator.py index 471c5fa..e92097e 100644 --- a/Tools/bgen/bgen/bgenGenerator.py +++ b/Tools/bgen/bgen/bgenGenerator.py @@ -256,7 +256,7 @@ class MethodGenerator(FunctionGenerator): self.itself = Variable(t0, "_self->ob_itself", SelfMode) self.argumentList.append(self.itself) FunctionGenerator.parseArgumentList(self, args) - + def _test(): void = None eggs = FunctionGenerator(void, "eggs", diff --git a/Tools/bgen/bgen/bgenObjectDefinition.py b/Tools/bgen/bgen/bgenObjectDefinition.py index 7f362f6..a77e337 100644 --- a/Tools/bgen/bgen/bgenObjectDefinition.py +++ b/Tools/bgen/bgen/bgenObjectDefinition.py @@ -45,7 +45,7 @@ class ObjectDefinition(GeneratorGroup): OutHeader2("Object type " + self.name) self.outputCheck() - + Output("typedef struct %s {", self.objecttype) IndentLevel() Output("PyObject_HEAD") diff --git a/Tools/bgen/bgen/bgenType.py b/Tools/bgen/bgen/bgenType.py index 3277c5a..a31aa74 100644 --- a/Tools/bgen/bgen/bgenType.py +++ b/Tools/bgen/bgen/bgenType.py @@ -34,7 +34,7 @@ class Type: return ["%s& %s" % (self.typeName, name)] else: return ["%s %s" % (self.typeName, name)] - + def getargs(self): return self.getargsFormat(), self.getargsArgs() @@ -78,7 +78,7 @@ class Type: Default is to call passInput(). """ return self.passInput(name) - + def errorCheck(self, name): """Check for an error returned in the variable. @@ -186,7 +186,7 @@ class FakeType(InputOnlyType): def __init__(self, substitute): self.substitute = substitute self.typeName = None # Don't show this argument in __doc__ string - + def getDeclarations(self, name, reference=False): return [] @@ -251,23 +251,23 @@ class OpaqueByValueType(OpaqueType): def mkvalueArgs(self, name): return "%s, %s" % (self.new, name) - + class OpaqueByRefType(OpaqueType): """An opaque object type, passed by reference. Instantiate with the type name, and optionally an object type name whose New/Convert functions will be used. """ - + def passInput(self, name): return name - + # def passOutput(self, name): # return name - + def mkvalueFormat(self): return "O" - + def mkvalueArgs(self, name): return "%s(%s)" % (self.new, name) diff --git a/Tools/bgen/bgen/bgenVariable.py b/Tools/bgen/bgen/bgenVariable.py index f44340d..bc1199c 100644 --- a/Tools/bgen/bgen/bgenVariable.py +++ b/Tools/bgen/bgen/bgenVariable.py @@ -44,7 +44,7 @@ class Variable: self.type.declare(self.name, reference=True) elif self.flags != SelfMode: self.type.declare(self.name) - + def getDeclarations(self): """Return the unadorned declaration of the variable, suitable for use in a formal parameter list.""" diff --git a/Tools/bgen/bgen/scantools.py b/Tools/bgen/bgen/scantools.py index 2423e43..67539e0 100644 --- a/Tools/bgen/bgen/scantools.py +++ b/Tools/bgen/bgen/scantools.py @@ -507,7 +507,7 @@ if missing: raise "Missing Types" def getmodifiers(self, match): return [] - + def pythonizename(self, name): name = re.sub("\*", " ptr", name) name = name.strip() @@ -600,7 +600,7 @@ if missing: raise "Missing Types" return new def generate(self, tp, name, arglist, modifiers=[]): - + self.typeused(tp, 'return') if modifiers: classname, listname = self.destination(tp, name, arglist, modifiers) |