summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-01-05 18:05:45 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-01-05 18:05:45 (GMT)
commit7d1eba9783baeafbf33f6a77bb365218698201ae (patch)
tree45e2f8bea57df0c02d751d2353e0cdd61ad40908 /Tools
parent29c612111b0791923103fe6a19714665aac42401 (diff)
downloadcpython-7d1eba9783baeafbf33f6a77bb365218698201ae.zip
cpython-7d1eba9783baeafbf33f6a77bb365218698201ae.tar.gz
cpython-7d1eba9783baeafbf33f6a77bb365218698201ae.tar.bz2
Added extra module argument varstuff, to declare extra module-level vars
Diffstat (limited to 'Tools')
-rw-r--r--Tools/bgen/bgen/bgenModule.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Tools/bgen/bgen/bgenModule.py b/Tools/bgen/bgen/bgenModule.py
index eda1a02..f339016 100644
--- a/Tools/bgen/bgen/bgenModule.py
+++ b/Tools/bgen/bgen/bgenModule.py
@@ -6,12 +6,14 @@ class Module(GeneratorGroup):
def __init__(self, name, prefix = None,
includestuff = None,
finalstuff = None,
- initstuff = None):
+ initstuff = None,
+ variablestuff = None):
GeneratorGroup.__init__(self, prefix or name)
self.name = name
self.includestuff = includestuff
self.initstuff = initstuff
self.finalstuff = finalstuff
+ self.variablestuff = variablestuff
def addobject(self, od):
self.generators.append(od)
@@ -64,6 +66,9 @@ class Module(GeneratorGroup):
Output("""Py_FatalError("can't initialize %s.Error");""",
self.name)
DedentLevel()
+ if self.variablestuff:
+ Output("%s", self.variablestuff)
+ Output()
def exceptionInitializer(self):
return """PyString_FromString("%s.Error")""" % self.name