[vala/0.40: 1/4] libvaladoc: Fix ownership declarations of Constants
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40: 1/4] libvaladoc: Fix ownership declarations of Constants
- Date: Mon, 14 Oct 2019 12:30:50 +0000 (UTC)
commit 4530b5695f3a3f5ab1099f7c20f997b0a2064a0c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Oct 11 16:19:19 2019 +0200
libvaladoc: Fix ownership declarations of Constants
valadoc/tests/drivers/generic-api-test.vala | 4 ++--
valadoc/treebuilder.vala | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/valadoc/tests/drivers/generic-api-test.vala b/valadoc/tests/drivers/generic-api-test.vala
index ba2606aaa..a5cb74887 100644
--- a/valadoc/tests/drivers/generic-api-test.vala
+++ b/valadoc/tests/drivers/generic-api-test.vala
@@ -1679,7 +1679,7 @@ public static void param_test (Api.Namespace ns, Api.Package pkg) {
assert (param.ellipsis == false);
// (.Symbol check)
assert (param.is_deprecated == false);
- assert (param.accessibility == Vala.SymbolAccessibility.PUBLIC);
+ assert (param.accessibility == Api.SymbolAccessibility.PUBLIC);
// (.Node)
assert (param.get_full_name () == "ParamTest.test_function_param_3a.a");
assert (param.get_filename () == "api-test.data.vapi");
@@ -1750,7 +1750,7 @@ public static void param_test (Api.Namespace ns, Api.Package pkg) {
assert (param.ellipsis == false);
// (.Symbol check)
assert (param.is_deprecated == false);
- assert (param.accessibility == Vala.SymbolAccessibility.PUBLIC);
+ assert (param.accessibility == Api.SymbolAccessibility.PUBLIC);
// (.Node)
assert (param.get_full_name () == "ParamTest.test_function_param_4a.a");
assert (param.get_filename () == "api-test.data.vapi");
diff --git a/valadoc/treebuilder.vala b/valadoc/treebuilder.vala
index 061cb0c79..e03d9d80d 100644
--- a/valadoc/treebuilder.vala
+++ b/valadoc/treebuilder.vala
@@ -705,6 +705,8 @@ public class Valadoc.Drivers.TreeBuilder : Vala.CodeVisitor {
return Ownership.OWNED;
}
return Ownership.DEFAULT;
+ } else if (type.parent_node is Vala.Constant) {
+ return Ownership.DEFAULT;
}
if (type.is_weak ()) {
return Ownership.UNOWNED;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]