[vala/0.44] libvaladoc: Drop unused code
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.44] libvaladoc: Drop unused code
- Date: Mon, 14 Oct 2019 12:27:31 +0000 (UTC)
commit e3fd48c619a1af5dbb2bd698424413842d4d2e53
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Oct 10 18:01:22 2019 +0200
libvaladoc: Drop unused code
libvaladoc/api/typereference.vala | 61 ---------------------------------------
1 file changed, 61 deletions(-)
---
diff --git a/libvaladoc/api/typereference.vala b/libvaladoc/api/typereference.vala
index 1f099d7c1..54fb17c02 100644
--- a/libvaladoc/api/typereference.vala
+++ b/libvaladoc/api/typereference.vala
@@ -44,10 +44,6 @@ public class Valadoc.Api.TypeReference : Item {
this.parent = parent;
}
- bool is_reference_counting (Vala.TypeSymbol sym) {
- return Vala.is_reference_counting (sym);
- }
-
bool type_reference_pass_ownership (Vala.DataType? element) {
if (element == null) {
return false;
@@ -68,63 +64,6 @@ public class Valadoc.Api.TypeReference : Item {
return false;
}
- bool is_type_reference_unowned (Vala.DataType? element) {
- if (element == null) {
- return false;
- }
-
- // non ref counted types are weak, not unowned
- if (element.data_type is Vala.TypeSymbol
- && is_reference_counting ((Vala.TypeSymbol) element.data_type) == true)
- {
- return false;
- }
-
- // FormalParameters are weak by default
- return (element.parent_node is Vala.Parameter == false)
- ? element.is_weak ()
- : false;
- }
-
- bool is_type_reference_owned (Vala.DataType? element) {
- if (element == null) {
- return false;
- }
-
- weak Vala.CodeNode parent = element.parent_node;
-
- // parameter:
- if (parent is Vala.Parameter) {
- if (((Vala.Parameter)parent).direction != Vala.ParameterDirection.IN) {
- return false;
- }
- return ((Vala.Parameter)parent).variable_type.value_owned;
- }
-
- return false;
- }
-
- bool is_type_reference_weak (Vala.DataType? element) {
- if (element == null) {
- return false;
- }
-
- // non ref counted types are unowned, not weak
- if (element.data_type is Vala.TypeSymbol
- && is_reference_counting ((Vala.TypeSymbol) element.data_type) == false)
- {
- return false;
- }
-
- // arrays are unowned, not weak
- if (element is Vala.ArrayType) {
- return false;
- }
-
- // FormalParameters are weak by default
- return (element.parent_node is Vala.Parameter == false)? element.is_weak () : false;
- }
-
Ownership get_type_reference_ownership (Vala.DataType? element) {
unowned Vala.DataType? type = element;
if (type != null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]