summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-12-17 22:08:48 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-12-17 22:08:48 (GMT)
commitff38505f1a43113114416a860bc857e93ee34d48 (patch)
tree037be0250826c5d7082a983ecfbf204737d45d61
parent92b5ca37c215fd2291c474c108361f09f9035a93 (diff)
downloadcpython-ff38505f1a43113114416a860bc857e93ee34d48.zip
cpython-ff38505f1a43113114416a860bc857e93ee34d48.tar.gz
cpython-ff38505f1a43113114416a860bc857e93ee34d48.tar.bz2
Added an optional longname argument to Module, which gives the full,
externally visible name of the module. This is so that type names can be shown as "Carbon.File.FSSpec" even though the real name of the module is "_File".
-rw-r--r--Tools/bgen/bgen/bgenModule.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Tools/bgen/bgen/bgenModule.py b/Tools/bgen/bgen/bgenModule.py
index ea1ea23..1a182a7 100644
--- a/Tools/bgen/bgen/bgenModule.py
+++ b/Tools/bgen/bgen/bgenModule.py
@@ -7,9 +7,14 @@ class Module(GeneratorGroup):
includestuff = None,
finalstuff = None,
initstuff = None,
- variablestuff = None):
+ variablestuff = None,
+ longname = None):
GeneratorGroup.__init__(self, prefix or name)
self.name = name
+ if longname:
+ self.longname = longname
+ else:
+ self.longname = name
self.includestuff = includestuff
self.initstuff = initstuff
self.finalstuff = finalstuff
@@ -19,7 +24,7 @@ class Module(GeneratorGroup):
def addobject(self, od):
self.generators.append(od)
self.typeobjects.append(od)
- od.setmodulename(self.name)
+ od.setmodulename(self.longname)
def generate(self):
OutHeader1("Module " + self.name)