mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Normalize whitespace to avoid offending Bug Day volunteers.
This commit is contained in:
parent
c700110735
commit
527c46996f
5 changed files with 13 additions and 13 deletions
|
@ -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",
|
||||
|
|
|
@ -45,7 +45,7 @@ class ObjectDefinition(GeneratorGroup):
|
|||
OutHeader2("Object type " + self.name)
|
||||
|
||||
self.outputCheck()
|
||||
|
||||
|
||||
Output("typedef struct %s {", self.objecttype)
|
||||
IndentLevel()
|
||||
Output("PyObject_HEAD")
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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."""
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue