diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2023-01-08 14:20:06 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2023-01-08 14:20:06 +0000 |
commit | 790bd8a474c2820564afc57a60f20f3deb4e0d42 (patch) | |
tree | 6a379379161793c1108f99479084d0554511b85f /giscanner | |
parent | 1053187779726413926676bad585780e4ac13ec0 (diff) | |
download | gobject-introspection-790bd8a474c2820564afc57a60f20f3deb4e0d42.tar.gz |
Skip default-value for non-transformable properties
If we can't transform a property default value to string, we are not
going to add a default-value attribute to the GIR. This is necessary
because non-transformable values may not always be pointers, so we
cannot default to "NULL".
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/gdumpparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py index 21fbadf4..b5ca4362 100644 --- a/giscanner/gdumpparser.py +++ b/giscanner/gdumpparser.py @@ -414,7 +414,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide writable = (flags & G_PARAM_WRITABLE) != 0 construct = (flags & G_PARAM_CONSTRUCT) != 0 construct_only = (flags & G_PARAM_CONSTRUCT_ONLY) != 0 - default_value = pspec.attrib['default-value'] + default_value = pspec.attrib.get('default-value') prop = ast.Property( pspec.attrib['name'], ast.Type.create_from_gtype_name(ctype), |