From: Rico Tzschichholz Date: Sat, 30 Jan 2021 10:44:17 +0000 (+0100) Subject: codegen: Don't emit invoker for methods attributed with NoWrapper X-Git-Tag: 0.51.1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3c794ba0c4d6db6600584c422ddd4820f80aa58;p=thirdparty%2Fvala.git codegen: Don't emit invoker for methods attributed with NoWrapper --- 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 (direct_hash, direct_equal); var carg_map = new HashMap (direct_hash, direct_equal);