[vala/staging] codegen: Don't emit invoker for async methods attributed with NoWrapper
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Don't emit invoker for async methods attributed with NoWrapper
- Date: Sun, 31 Jan 2021 12:15:06 +0000 (UTC)
commit 572ea42a8fd82275d73c28548c159cbf93dc3205
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Jan 31 13:04:52 2021 +0100
codegen: Don't emit invoker for async methods attributed with NoWrapper
codegen/valaccodebasemodule.vala | 2 +-
codegen/valaccodemethodmodule.vala | 4 +++-
codegen/valagasyncmodule.vala | 5 ++++-
3 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index c69351e2e..0f501fc2e 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4763,7 +4763,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
}
public virtual bool generate_method_declaration (Method m, CCodeFile decl_space) {
- return !add_symbol_declaration (decl_space, m, get_ccode_name (m));
+ return false;
}
public virtual void generate_error_domain_declaration (ErrorDomain edomain, CCodeFile decl_space) {
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 9402ad6ab..ff81b2dd9 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -153,6 +153,9 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
if (m.is_async_callback) {
return false;
}
+ if ((m.is_abstract || m.is_virtual) && m.get_attribute ("NoWrapper") != null) {
+ return false;
+ }
if (add_symbol_declaration (decl_space, m, get_ccode_name (m))) {
return false;
}
@@ -336,7 +339,6 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
// do not declare overriding methods and interface implementations
if ((m.is_abstract || m.is_virtual
|| (m.base_method == null && m.base_interface_method == null))
- && m.get_attribute ("NoWrapper") == null
&& m.signal_reference == null) {
generate_method_declaration (m, cfile);
diff --git a/codegen/valagasyncmodule.vala b/codegen/valagasyncmodule.vala
index c9946599f..36270edc3 100644
--- a/codegen/valagasyncmodule.vala
+++ b/codegen/valagasyncmodule.vala
@@ -339,6 +339,9 @@ public class Vala.GAsyncModule : GtkModule {
public override bool generate_method_declaration (Method m, CCodeFile decl_space) {
if (m.coroutine) {
+ if ((m.is_abstract || m.is_virtual) && m.get_attribute ("NoWrapper") != null) {
+ return false;
+ }
if (add_symbol_declaration (decl_space, m, get_ccode_name (m))) {
return false;
}
@@ -450,7 +453,7 @@ public class Vala.GAsyncModule : GtkModule {
}
}
- if (m.is_abstract || m.is_virtual) {
+ if ((m.is_abstract || m.is_virtual) && m.get_attribute ("NoWrapper") == null) {
// generate virtual function wrappers
var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
var carg_map = new HashMap<int,CCodeExpression> (direct_hash, direct_equal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]