Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7d66b00

Browse files
committed
Whitespace normalization.
1 parent 9a3240e commit 7d66b00

7 files changed

Lines changed: 29 additions & 29 deletions

File tree

Tools/bgen/bgen/bgenBuffer.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,23 @@ def __init__(self, size, datatype = 'char', sizetype = 'int', sizeformat = None)
4141
def getArgDeclarations(self, name, reference=False, constmode=False):
4242
if reference:
4343
raise RuntimeError, "Cannot pass buffer types by reference"
44-
return (self.getBufferDeclarations(name, constmode) +
44+
return (self.getBufferDeclarations(name, constmode) +
4545
self.getSizeDeclarations(name))
4646

4747
def getBufferDeclarations(self, name, constmode=False):
4848
return self.getInputBufferDeclarations(name, constmode) + \
49-
self.getOutputBufferDeclarations(name, constmode)
49+
self.getOutputBufferDeclarations(name, constmode)
5050

5151
def getInputBufferDeclarations(self, name, constmode=False):
52-
if constmode:
53-
const = "const "
54-
else:
55-
const = ""
52+
if constmode:
53+
const = "const "
54+
else:
55+
const = ""
5656
return ["%s%s *%s__in__" % (const, self.datatype, name)]
5757

5858
def getOutputBufferDeclarations(self, name, constmode=False):
59-
if constmode:
60-
raise RuntimeError, "Cannot use const output buffer"
59+
if constmode:
60+
raise RuntimeError, "Cannot use const output buffer"
6161
return ["%s %s__out__[%s]" % (self.datatype, name, self.size)]
6262

6363
def getSizeDeclarations(self, name):
@@ -194,21 +194,21 @@ def __init__(self, type):
194194
self.typeName = self.type = type
195195

196196
def getInputBufferDeclarations(self, name, constmode=False):
197-
if constmode:
198-
const = "const "
199-
else:
200-
const = ""
197+
if constmode:
198+
const = "const "
199+
else:
200+
const = ""
201201
return ["%s%s *%s__in__" % (const, self.type, name)]
202202

203203
def getSizeDeclarations(self, name):
204204
return []
205-
205+
206206
def getAuxDeclarations(self, name):
207207
return ["int %s__in_len__" % (name)]
208208

209209
def getOutputBufferDeclarations(self, name, constmode=False):
210-
if constmode:
211-
raise RuntimeError, "Cannot use const output buffer"
210+
if constmode:
211+
raise RuntimeError, "Cannot use const output buffer"
212212
return ["%s %s__out__" % (self.type, name)]
213213

214214
def getargsArgs(self, name):

Tools/bgen/bgen/bgenGenerator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def setprefix(self, prefix):
3232

3333
def checkgenerate(self):
3434
return True
35-
35+
3636
def generate(self):
3737
if not self.checkgenerate():
3838
return
@@ -234,7 +234,7 @@ def getrvforcallit(self):
234234
return "%s = " % self.rv.name
235235
else:
236236
return ""
237-
237+
238238
def checkit(self):
239239
for arg in self.argumentList:
240240
arg.errorCheck()

Tools/bgen/bgen/bgenHeapBuffer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ def __init__(self, datatype = 'char', sizetype = 'int', sizeformat = None):
1717
FixedInputOutputBufferType.__init__(self, "0", datatype, sizetype, sizeformat)
1818

1919
def getOutputBufferDeclarations(self, name, constmode=False):
20-
if constmode:
21-
raise RuntimeError, "Cannot use const output buffer"
20+
if constmode:
21+
raise RuntimeError, "Cannot use const output buffer"
2222
return ["%s *%s__out__" % (self.datatype, name)]
2323

2424
def getargsCheck(self, name):

Tools/bgen/bgen/bgenObjectDefinition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def outputTypeObjectInitializer(self):
220220
Output("""Py_INCREF(&%s);""", self.typename)
221221
Output("PyModule_AddObject(m, \"%s\", (PyObject *)&%s);", self.name, self.typename);
222222
self.outputTypeObjectInitializerCompat()
223-
223+
224224
def outputTypeObjectInitializerCompat(self):
225225
Output("/* Backward-compatible name */")
226226
Output("""Py_INCREF(&%s);""", self.typename);

Tools/bgen/bgen/bgenType.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def getAuxDeclarations(self, name):
4747
type, such as helper variables used to hold sizes, etc. These declarations
4848
are not part of the C/C++ function call interface."""
4949
return []
50-
50+
5151
def getargs(self):
5252
return self.getargsFormat(), self.getargsArgs()
5353

@@ -68,10 +68,10 @@ def getargsArgs(self, name):
6868

6969
def getargsPreCheck(self, name):
7070
"""Perform any actions needed before calling getargs().
71-
71+
7272
This could include declaring temporary variables and such.
7373
"""
74-
74+
7575
def getargsCheck(self, name):
7676
"""Perform any needed post-[new]getargs() checks.
7777
@@ -133,10 +133,10 @@ def mkvalueArgs(self, name):
133133

134134
def mkvaluePreCheck(self, name):
135135
"""Perform any actions needed before calling mkvalue().
136-
136+
137137
This could include declaring temporary variables and such.
138138
"""
139-
139+
140140
def cleanup(self, name):
141141
"""Clean up if necessary.
142142

Tools/bgen/bgen/bgenVariable.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def declare(self):
4848
def getArgDeclarations(self, constmode=False):
4949
refmode = (self.flags & RefMode)
5050
if constmode:
51-
constmode = (self.flags & ConstMode)
51+
constmode = (self.flags & ConstMode)
5252
return self.type.getArgDeclarations(self.name,
53-
reference=refmode, constmode=constmode)
54-
53+
reference=refmode, constmode=constmode)
54+
5555
def getAuxDeclarations(self):
5656
return self.type.getAuxDeclarations(self.name)
5757

Tools/bgen/bgen/scantools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def generate(self, tp, name, arglist, modifiers=[]):
626626

627627
def destination(self, type, name, arglist):
628628
return "FunctionGenerator", "functions"
629-
629+
630630
def generatemodifiers(self, classname, name, modifiers):
631631
pass
632632

0 commit comments

Comments
 (0)