[gi-docgen: 1/2] Make (optional) annotations work




commit 794a7b51147ce6686f6e35d9bdf710260fc9b1ab
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed May 19 20:39:39 2021 -0400

    Make (optional) annotations work
    
    We were parsing them out of the gir file, but not
    handing them into the templates.

 gidocgen/gdgenerate.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gidocgen/gdgenerate.py b/gidocgen/gdgenerate.py
index 6e110b9..84dba42 100644
--- a/gidocgen/gdgenerate.py
+++ b/gidocgen/gdgenerate.py
@@ -348,6 +348,7 @@ class TemplateArgument:
         self.is_macro = isinstance(call, gir.FunctionMacro)
         self.transfer = ARG_TRANSFER_MODES[argument.transfer]
         self.direction = DIRECTION_MODES[argument.direction]
+        self.optional = argument.optional
         self.nullable = argument.nullable
         self.scope = SCOPE_MODES[argument.scope or 'none']
         self.introspectable = argument.introspectable


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