diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-15 06:19:58 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-02-15 19:54:08 -0500 |
commit | df159069ed6ce9f5e0fa720036fc14a498391935 (patch) | |
tree | a7f99a5039ed009b130673be45f764cb07741e1e /giscanner/girparser.py | |
parent | dff12f1992255e2e81dfdfb6433d6255667434c0 (diff) | |
download | gobject-introspection-df159069ed6ce9f5e0fa720036fc14a498391935.tar.gz |
girparser: Clean up code
This makes it only use kwargs
https://bugzilla.gnome.org/show_bug.cgi?id=693876
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r-- | giscanner/girparser.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py index bd259b87..18f41d39 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: |