]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added an optional longname argument to Module, which gives the full,
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 17 Dec 2002 22:08:48 +0000 (22:08 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 17 Dec 2002 22:08:48 +0000 (22:08 +0000)
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".

Tools/bgen/bgen/bgenModule.py

index ea1ea230a7e63cc64198bd821458f836de03dcf7..1a182a7013ff360483628f9fee0c9d52258b3e92 100644 (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)