mirror of https://github.com/python/cpython
Whitespace normalization.
This commit is contained in:
parent
9a3240e8e6
commit
7d66b00f29
|
@ -46,18 +46,18 @@ class FixedInputOutputBufferType(InputOnlyType):
|
|||
|
||||
def getBufferDeclarations(self, name, constmode=False):
|
||||
return self.getInputBufferDeclarations(name, constmode) + \
|
||||
self.getOutputBufferDeclarations(name, constmode)
|
||||
self.getOutputBufferDeclarations(name, constmode)
|
||||
|
||||
def getInputBufferDeclarations(self, name, constmode=False):
|
||||
if constmode:
|
||||
const = "const "
|
||||
else:
|
||||
const = ""
|
||||
if constmode:
|
||||
const = "const "
|
||||
else:
|
||||
const = ""
|
||||
return ["%s%s *%s__in__" % (const, self.datatype, name)]
|
||||
|
||||
def getOutputBufferDeclarations(self, name, constmode=False):
|
||||
if constmode:
|
||||
raise RuntimeError, "Cannot use const output buffer"
|
||||
if constmode:
|
||||
raise RuntimeError, "Cannot use const output buffer"
|
||||
return ["%s %s__out__[%s]" % (self.datatype, name, self.size)]
|
||||
|
||||
def getSizeDeclarations(self, name):
|
||||
|
@ -194,10 +194,10 @@ class StructInputOutputBufferType(FixedInputOutputBufferType):
|
|||
self.typeName = self.type = type
|
||||
|
||||
def getInputBufferDeclarations(self, name, constmode=False):
|
||||
if constmode:
|
||||
const = "const "
|
||||
else:
|
||||
const = ""
|
||||
if constmode:
|
||||
const = "const "
|
||||
else:
|
||||
const = ""
|
||||
return ["%s%s *%s__in__" % (const, self.type, name)]
|
||||
|
||||
def getSizeDeclarations(self, name):
|
||||
|
@ -207,8 +207,8 @@ class StructInputOutputBufferType(FixedInputOutputBufferType):
|
|||
return ["int %s__in_len__" % (name)]
|
||||
|
||||
def getOutputBufferDeclarations(self, name, constmode=False):
|
||||
if constmode:
|
||||
raise RuntimeError, "Cannot use const output buffer"
|
||||
if constmode:
|
||||
raise RuntimeError, "Cannot use const output buffer"
|
||||
return ["%s %s__out__" % (self.type, name)]
|
||||
|
||||
def getargsArgs(self, name):
|
||||
|
|
|
@ -17,8 +17,8 @@ class HeapInputOutputBufferType(FixedInputOutputBufferType):
|
|||
FixedInputOutputBufferType.__init__(self, "0", datatype, sizetype, sizeformat)
|
||||
|
||||
def getOutputBufferDeclarations(self, name, constmode=False):
|
||||
if constmode:
|
||||
raise RuntimeError, "Cannot use const output buffer"
|
||||
if constmode:
|
||||
raise RuntimeError, "Cannot use const output buffer"
|
||||
return ["%s *%s__out__" % (self.datatype, name)]
|
||||
|
||||
def getargsCheck(self, name):
|
||||
|
|
|
@ -48,9 +48,9 @@ class Variable:
|
|||
def getArgDeclarations(self, constmode=False):
|
||||
refmode = (self.flags & RefMode)
|
||||
if constmode:
|
||||
constmode = (self.flags & ConstMode)
|
||||
constmode = (self.flags & ConstMode)
|
||||
return self.type.getArgDeclarations(self.name,
|
||||
reference=refmode, constmode=constmode)
|
||||
reference=refmode, constmode=constmode)
|
||||
|
||||
def getAuxDeclarations(self):
|
||||
return self.type.getAuxDeclarations(self.name)
|
||||
|
|
Loading…
Reference in New Issue