summaryrefslogtreecommitdiff
path: root/Tools/bgen
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2005-06-24 19:46:53 +0000
committerTim Peters <tim.peters@gmail.com>2005-06-24 19:46:53 +0000
commit31c2d450ed69e9e76cee998f5823dd9f8e0bbf5d (patch)
tree7353138f1484a9083c684f2d405d2b069a1c43e2 /Tools/bgen
parentcd42fe8549bb529434e4f482e99de20a17195ac3 (diff)
downloadcpython-31c2d450ed69e9e76cee998f5823dd9f8e0bbf5d.tar.gz
Normalize whitespace to avoid offending Bug Day volunteers.
Diffstat (limited to 'Tools/bgen')
-rw-r--r--Tools/bgen/bgen/bgenGenerator.py2
-rw-r--r--Tools/bgen/bgen/bgenObjectDefinition.py2
-rw-r--r--Tools/bgen/bgen/bgenType.py16
-rw-r--r--Tools/bgen/bgen/bgenVariable.py2
-rw-r--r--Tools/bgen/bgen/scantools.py4
5 files changed, 13 insertions, 13 deletions
diff --git a/Tools/bgen/bgen/bgenGenerator.py b/Tools/bgen/bgen/bgenGenerator.py
index 471c5fa300..e92097efab 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 7f362f6bc0..a77e337df8 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 3277c5a9a8..a31aa74cef 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 f44340d9f4..bc1199cd89 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 2423e43c35..67539e08bc 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)