pyges: Make use of the namespace for the constructor classnames in codegen
authorThibault Saunier <thibault.saunier@collabora.co.uk>
Fri, 6 May 2011 21:11:11 +0000 (18:11 -0300)
committerThibault Saunier <thibault.saunier@collabora.com>
Wed, 10 Aug 2011 15:12:46 +0000 (17:12 +0200)
bindings/python/codegen/h2def.py

index 17617fa..8384370 100755 (executable)
@@ -509,7 +509,13 @@ class DefsWriter:
         m = func_new_pat.match(name)
         if pointer_pat.match(ret) and m:
             cname = ''
-            for s in m.group(1).split ('_'):
+            names = m.group(1).split('_')
+
+            if self.namespace:
+                cname = self.namespace
+                names = names[1:]
+
+            for s in names:
                 cname += s.title()
             if cname != '':
                 self.fp.write('  (is-constructor-of "' + cname + '")\n')