summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/bgen/bgen/bgenGenerator.py12
-rw-r--r--Tools/bgen/bgen/bgenGeneratorGroup.py5
-rw-r--r--Tools/bgen/bgen/bgenModule.py4
-rw-r--r--Tools/bgen/bgen/bgenObjectDefinition.py2
-rw-r--r--Tools/bgen/bgen/bgenOutput.py2
5 files changed, 13 insertions, 12 deletions
diff --git a/Tools/bgen/bgen/bgenGenerator.py b/Tools/bgen/bgen/bgenGenerator.py
index 47fed8e..1a35c12 100644
--- a/Tools/bgen/bgen/bgenGenerator.py
+++ b/Tools/bgen/bgen/bgenGenerator.py
@@ -259,12 +259,12 @@ class MethodGenerator(FunctionGenerator):
def _test():
void = None
- eggs = Generator(void, "eggs",
- Variable(stringptr, 'cmd'),
- Variable(int, 'x'),
- Variable(double, 'y', InOutMode),
- Variable(int, 'status', ErrorMode),
- )
+ eggs = FunctionGenerator(void, "eggs",
+ (stringptr, 'cmd', InMode),
+ (int, 'x', InMode),
+ (double, 'y', InOutMode),
+ (int, 'status', ErrorMode),
+ )
eggs.setprefix("spam")
print "/* START */"
eggs.generate()
diff --git a/Tools/bgen/bgen/bgenGeneratorGroup.py b/Tools/bgen/bgen/bgenGeneratorGroup.py
index 5a62905..784bf69 100644
--- a/Tools/bgen/bgen/bgenGeneratorGroup.py
+++ b/Tools/bgen/bgen/bgenGeneratorGroup.py
@@ -28,9 +28,10 @@ class GeneratorGroup:
def _test():
- from bgenGenerator import Generator
+ void = None
+ from bgenGenerator import FunctionGenerator
group = GeneratorGroup("spam")
- eggs = Generator(void, "eggs")
+ eggs = FunctionGenerator(void, "eggs")
group.add(eggs)
print "/* START */"
group.generate()
diff --git a/Tools/bgen/bgen/bgenModule.py b/Tools/bgen/bgen/bgenModule.py
index b4a3db0..5f94b904 100644
--- a/Tools/bgen/bgen/bgenModule.py
+++ b/Tools/bgen/bgen/bgenModule.py
@@ -78,9 +78,9 @@ class Module(GeneratorGroup):
def _test():
- from bgenGenerator import Generator
+ from bgenGenerator import FunctionGenerator
m = Module("spam", "", "#include <stdio.h>")
- g = Generator(None, "bacon")
+ g = FunctionGenerator(None, "bacon")
m.add(g)
m.generate()
diff --git a/Tools/bgen/bgen/bgenObjectDefinition.py b/Tools/bgen/bgen/bgenObjectDefinition.py
index e6db9cd..2186e0e 100644
--- a/Tools/bgen/bgen/bgenObjectDefinition.py
+++ b/Tools/bgen/bgen/bgenObjectDefinition.py
@@ -189,7 +189,7 @@ class ObjectDefinition(GeneratorGroup):
Output("""if (PyDict_SetItemString(d, "%sType", (PyObject *)&%s) != 0)""",
self.name, self.typename);
IndentLevel()
- Output("""Py_FatalError("can't initialize %sType");""",
+ Output("""Py_FatalError("can\'t initialize %sType");""",
self.name)
DedentLevel()
diff --git a/Tools/bgen/bgen/bgenOutput.py b/Tools/bgen/bgen/bgenOutput.py
index 1a512e5..a269585 100644
--- a/Tools/bgen/bgen/bgenOutput.py
+++ b/Tools/bgen/bgen/bgenOutput.py
@@ -43,7 +43,7 @@ SetOutputFile() # Initialize _File
_Level = 0 # Indentation level
def GetLevel():
- """"Return the current indentation level."""
+ """Return the current indentation level."""
return _Level
def SetLevel(level):