Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
527c4699
Commit
527c4699
authored
Jun 24, 2005
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Normalize whitespace to avoid offending Bug Day volunteers.
parent
c7001107
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
Tools/bgen/bgen/bgenGenerator.py
Tools/bgen/bgen/bgenGenerator.py
+1
-1
Tools/bgen/bgen/bgenObjectDefinition.py
Tools/bgen/bgen/bgenObjectDefinition.py
+1
-1
Tools/bgen/bgen/bgenType.py
Tools/bgen/bgen/bgenType.py
+8
-8
Tools/bgen/bgen/bgenVariable.py
Tools/bgen/bgen/bgenVariable.py
+1
-1
Tools/bgen/bgen/scantools.py
Tools/bgen/bgen/scantools.py
+2
-2
No files found.
Tools/bgen/bgen/bgenGenerator.py
View file @
527c4699
...
@@ -256,7 +256,7 @@ class MethodGenerator(FunctionGenerator):
...
@@ -256,7 +256,7 @@ class MethodGenerator(FunctionGenerator):
self.itself = Variable(t0, "
_self
->
ob_itself
", SelfMode)
self.itself = Variable(t0, "
_self
->
ob_itself
", SelfMode)
self.argumentList.append(self.itself)
self.argumentList.append(self.itself)
FunctionGenerator.parseArgumentList(self, args)
FunctionGenerator.parseArgumentList(self, args)
def _test():
def _test():
void = None
void = None
eggs = FunctionGenerator(void, "
eggs
",
eggs = FunctionGenerator(void, "
eggs
",
...
...
Tools/bgen/bgen/bgenObjectDefinition.py
View file @
527c4699
...
@@ -45,7 +45,7 @@ class ObjectDefinition(GeneratorGroup):
...
@@ -45,7 +45,7 @@ class ObjectDefinition(GeneratorGroup):
OutHeader2
(
"Object type "
+
self
.
name
)
OutHeader2
(
"Object type "
+
self
.
name
)
self
.
outputCheck
()
self
.
outputCheck
()
Output
(
"typedef struct %s {"
,
self
.
objecttype
)
Output
(
"typedef struct %s {"
,
self
.
objecttype
)
IndentLevel
()
IndentLevel
()
Output
(
"PyObject_HEAD"
)
Output
(
"PyObject_HEAD"
)
...
...
Tools/bgen/bgen/bgenType.py
View file @
527c4699
...
@@ -34,7 +34,7 @@ class Type:
...
@@ -34,7 +34,7 @@ class Type:
return
[
"%s& %s"
%
(
self
.
typeName
,
name
)]
return
[
"%s& %s"
%
(
self
.
typeName
,
name
)]
else
:
else
:
return
[
"%s %s"
%
(
self
.
typeName
,
name
)]
return
[
"%s %s"
%
(
self
.
typeName
,
name
)]
def
getargs
(
self
):
def
getargs
(
self
):
return
self
.
getargsFormat
(),
self
.
getargsArgs
()
return
self
.
getargsFormat
(),
self
.
getargsArgs
()
...
@@ -78,7 +78,7 @@ class Type:
...
@@ -78,7 +78,7 @@ class Type:
Default is to call passInput().
Default is to call passInput().
"""
"""
return
self
.
passInput
(
name
)
return
self
.
passInput
(
name
)
def
errorCheck
(
self
,
name
):
def
errorCheck
(
self
,
name
):
"""Check for an error returned in the variable.
"""Check for an error returned in the variable.
...
@@ -186,7 +186,7 @@ class FakeType(InputOnlyType):
...
@@ -186,7 +186,7 @@ class FakeType(InputOnlyType):
def
__init__
(
self
,
substitute
):
def
__init__
(
self
,
substitute
):
self
.
substitute
=
substitute
self
.
substitute
=
substitute
self
.
typeName
=
None
# Don't show this argument in __doc__ string
self
.
typeName
=
None
# Don't show this argument in __doc__ string
def
getDeclarations
(
self
,
name
,
reference
=
False
):
def
getDeclarations
(
self
,
name
,
reference
=
False
):
return
[]
return
[]
...
@@ -251,23 +251,23 @@ class OpaqueByValueType(OpaqueType):
...
@@ -251,23 +251,23 @@ class OpaqueByValueType(OpaqueType):
def
mkvalueArgs
(
self
,
name
):
def
mkvalueArgs
(
self
,
name
):
return
"%s, %s"
%
(
self
.
new
,
name
)
return
"%s, %s"
%
(
self
.
new
,
name
)
class
OpaqueByRefType
(
OpaqueType
):
class
OpaqueByRefType
(
OpaqueType
):
"""An opaque object type, passed by reference.
"""An opaque object type, passed by reference.
Instantiate with the type name, and optionally an object type name whose
Instantiate with the type name, and optionally an object type name whose
New/Convert functions will be used.
New/Convert functions will be used.
"""
"""
def
passInput
(
self
,
name
):
def
passInput
(
self
,
name
):
return
name
return
name
# def passOutput(self, name):
# def passOutput(self, name):
# return name
# return name
def
mkvalueFormat
(
self
):
def
mkvalueFormat
(
self
):
return
"O"
return
"O"
def
mkvalueArgs
(
self
,
name
):
def
mkvalueArgs
(
self
,
name
):
return
"%s(%s)"
%
(
self
.
new
,
name
)
return
"%s(%s)"
%
(
self
.
new
,
name
)
...
...
Tools/bgen/bgen/bgenVariable.py
View file @
527c4699
...
@@ -44,7 +44,7 @@ class Variable:
...
@@ -44,7 +44,7 @@ class Variable:
self
.
type
.
declare
(
self
.
name
,
reference
=
True
)
self
.
type
.
declare
(
self
.
name
,
reference
=
True
)
elif
self
.
flags
!=
SelfMode
:
elif
self
.
flags
!=
SelfMode
:
self
.
type
.
declare
(
self
.
name
)
self
.
type
.
declare
(
self
.
name
)
def
getDeclarations
(
self
):
def
getDeclarations
(
self
):
"""Return the unadorned declaration of the variable,
"""Return the unadorned declaration of the variable,
suitable for use in a formal parameter list."""
suitable for use in a formal parameter list."""
...
...
Tools/bgen/bgen/scantools.py
View file @
527c4699
...
@@ -507,7 +507,7 @@ if missing: raise "Missing Types"
...
@@ -507,7 +507,7 @@ if missing: raise "Missing Types"
def getmodifiers(self, match):
def getmodifiers(self, match):
return []
return []
def pythonizename(self, name):
def pythonizename(self, name):
name = re.sub("
\
*
", "
ptr
", name)
name = re.sub("
\
*
", "
ptr
", name)
name = name.strip()
name = name.strip()
...
@@ -600,7 +600,7 @@ if missing: raise "Missing Types"
...
@@ -600,7 +600,7 @@ if missing: raise "Missing Types"
return new
return new
def generate(self, tp, name, arglist, modifiers=[]):
def generate(self, tp, name, arglist, modifiers=[]):
self.typeused(tp, 'return')
self.typeused(tp, 'return')
if modifiers:
if modifiers:
classname, listname = self.destination(tp, name, arglist, modifiers)
classname, listname = self.destination(tp, name, arglist, modifiers)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment