[vala/staging: 5/6] codegen: Don't emit invoker for methods attributed with NoWrapper
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging: 5/6] codegen: Don't emit invoker for methods attributed with NoWrapper
- Date: Sat, 30 Jan 2021 12:19:37 +0000 (UTC)
commit c3c794ba0c4d6db6600584c422ddd4820f80aa58
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Jan 30 11:44:17 2021 +0100
codegen: Don't emit invoker for methods attributed with NoWrapper
codegen/valaccodemethodmodule.vala | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index ae05c917a..467273547 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -335,7 +335,9 @@ 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.signal_reference
== null) {
+ || (m.base_method == null && m.base_interface_method == null))
+ && m.get_attribute ("NoWrapper") == null
+ && m.signal_reference == null) {
generate_method_declaration (m, cfile);
if (!m.is_internal_symbol ()) {
@@ -807,11 +809,11 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
pop_context ();
- if ((m.is_abstract || m.is_virtual) && !m.coroutine &&
- /* If the method is a signal handler, the declaration
- * is not needed. -- the name should be reserved for the
- * emitter! */
- m.signal_reference == null) {
+ if ((m.is_abstract || m.is_virtual) && !m.coroutine
+ && m.get_attribute ("NoWrapper") == null
+ // If the method is a signal handler, the declaration is not needed.
+ // the name should be reserved for the emitter!
+ && m.signal_reference == null) {
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]