From: Jack Jansen Date: Tue, 17 Dec 2002 22:08:48 +0000 (+0000) Subject: Added an optional longname argument to Module, which gives the full, X-Git-Tag: v2.3c1~2975 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff38505f1a43113114416a860bc857e93ee34d48;p=thirdparty%2FPython%2Fcpython.git 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". --- diff --git a/Tools/bgen/bgen/bgenModule.py b/Tools/bgen/bgen/bgenModule.py index ea1ea230a7e6..1a182a7013ff 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)