[vala/staging] codegen: Drop superfluous "method_has_wrapper" helper



commit 40344b23a2291dc699ed4a91dc3e0fb8913c8eb4
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Dec 30 14:50:05 2020 +0100

    codegen: Drop superfluous "method_has_wrapper" helper

 codegen/valaccodebasemodule.vala         | 4 ----
 codegen/valaccodememberaccessmodule.vala | 2 +-
 codegen/valaccodemethodmodule.vala       | 4 ----
 3 files changed, 1 insertion(+), 9 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 03072d3b6..393bb16ff 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -6532,10 +6532,6 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
        public virtual void generate_dynamic_method_wrapper (DynamicMethod method) {
        }
 
-       public virtual bool method_has_wrapper (Method method) {
-               return false;
-       }
-
        public virtual CCodeExpression get_param_spec_cexpression (Property prop) {
                return new CCodeInvalidExpression ();
        }
diff --git a/codegen/valaccodememberaccessmodule.vala b/codegen/valaccodememberaccessmodule.vala
index 48f224655..b3b578435 100644
--- a/codegen/valaccodememberaccessmodule.vala
+++ b/codegen/valaccodememberaccessmodule.vala
@@ -65,7 +65,7 @@ public abstract class Vala.CCodeMemberAccessModule : CCodeControlFlowModule {
                        }
 
                        if (m.base_method != null) {
-                               if (!method_has_wrapper (m.base_method)) {
+                               if (m.base_method.get_attribute ("NoWrapper") != null) {
                                        var base_class = (Class) m.base_method.parent_symbol;
                                        if (!base_class.is_compact) {
                                                var vclass = new CCodeFunctionCall (new CCodeIdentifier 
(get_ccode_class_get_function (base_class)));
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 79110be88..297abb659 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -30,10 +30,6 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
 
        private bool ellipses_to_valist = false;
 
-       public override bool method_has_wrapper (Method method) {
-               return (method.get_attribute ("NoWrapper") == null);
-       }
-
        string get_creturn_type (Method m, string default_value) {
                string type = get_ccode_type (m);
                if (type == null) {


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