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".
This commit is contained in:
Jack Jansen 2002-12-17 22:08:48 +00:00
parent 92b5ca37c2
commit ff38505f1a
1 changed files with 7 additions and 2 deletions

View File

@ -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)