summaryrefslogtreecommitdiff
path: root/giscanner/girparser.py
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2022-08-30 23:45:50 +0100
committerEmmanuele Bassi <ebassi@gmail.com>2023-01-08 14:03:20 +0000
commit1053187779726413926676bad585780e4ac13ec0 (patch)
treeade58ed5bc8cd851d9664f7f12e1325c82d2f466 /giscanner/girparser.py
parentbfe4b306506547bd7bbc25123c1323e561b5096e (diff)
downloadgobject-introspection-1053187779726413926676bad585780e4ac13ec0.tar.gz
Add an optional attribute for the property default value
The default-value attribute for a property element is fundamentally meant for documentation generators. We only care about the GIR data, as the conversion from the default value to a string is lossy by definition, and may very well not roundtrip.
Diffstat (limited to 'giscanner/girparser.py')
-rw-r--r--giscanner/girparser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/giscanner/girparser.py b/giscanner/girparser.py
index edaaa992..5fc22899 100644
--- a/giscanner/girparser.py
+++ b/giscanner/girparser.py
@@ -609,6 +609,7 @@ class GIRParser(object):
node.attrib.get('transfer-ownership'))
prop.setter = node.attrib.get('setter')
prop.getter = node.attrib.get('getter')
+ prop.default_value = node.attrib.get('default-value')
prop.parent = parent
self._parse_generic_attribs(node, prop)
return prop