mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
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:
parent
92b5ca37c2
commit
ff38505f1a
1 changed files with 7 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue