[gi-docgen: 2/2] Merge branch 'optional-args' into 'main'
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gi-docgen: 2/2] Merge branch 'optional-args' into 'main'
- Date: Thu, 20 May 2021 11:39:01 +0000 (UTC)
commit cb2466b7631fea53b63ddc8741ad1c070647daf3
Merge: 323294c 794a7b5
Author: Emmanuele Bassi <ebassi gmail com>
Date: Thu May 20 11:39:01 2021 +0000
Merge branch 'optional-args' into 'main'
Make (optional) annotations work
See merge request GNOME/gi-docgen!68
gidocgen/gdgenerate.py | 1 +
1 file changed, 1 insertion(+)
---
diff --cc gidocgen/gdgenerate.py
index 45cf873,84dba42..e155bb7
--- a/gidocgen/gdgenerate.py
+++ b/gidocgen/gdgenerate.py
@@@ -347,9 -346,9 +347,10 @@@ class TemplateArgument
self.is_map = isinstance(argument.target, gir.MapType)
self.is_varargs = isinstance(argument.target, gir.VarArgs)
self.is_macro = isinstance(call, gir.FunctionMacro)
- self.transfer = ARG_TRANSFER_MODES[argument.transfer]
+ self.transfer = argument.transfer or 'none'
+ self.transfer_note = ARG_TRANSFER_MODES[argument.transfer or 'none']
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]