[gobject-introspection] girparser: Clean up code



commit df159069ed6ce9f5e0fa720036fc14a498391935
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Feb 15 06:19:58 2013 -0500

    girparser: Clean up code
    
    This makes it only use kwargs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693876

 giscanner/girparser.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index bd259b8..18f41d3 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -215,9 +215,9 @@ class GIRParser(object):
         else:
             parent_type = None
 
-        ctor_args = [node.attrib['name'],
-                     parent_type]
-        ctor_kwargs = {'gtype_name': node.attrib[_glibns('type-name')],
+        ctor_kwargs = {'name': node.attrib['name'],
+                       'parent': parent_type,
+                       'gtype_name': node.attrib[_glibns('type-name')],
                        'get_type': node.attrib[_glibns('get-type')],
                        'c_symbol_prefix': node.attrib.get(_cns('symbol-prefix')),
                        'ctype': node.attrib.get(_cns('type'))}
@@ -231,7 +231,7 @@ class GIRParser(object):
         else:
             raise AssertionError(node)
 
-        obj = klass(*ctor_args, **ctor_kwargs)
+        obj = klass(**ctor_kwargs)
         self._parse_generic_attribs(node, obj)
         type_struct = node.attrib.get(_glibns('type-struct'))
         if type_struct:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]