summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-01-30 11:44:17 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-02-27 19:37:12 +0100
commit8eec6160ebb662af10ee7547f59b51ddc6a42a0a (patch)
treef7112811246891b0d9f4350dcd77793ddff5c1ca
parent9fb18b884ff30cda56ed1bc1e5b85db7bb717c5e (diff)
downloadvala-8eec6160ebb662af10ee7547f59b51ddc6a42a0a.tar.gz
codegen: Don't emit invoker for methods attributed with NoWrapper
-rw-r--r--codegen/valaccodemethodmodule.vala14
1 files changed, 8 insertions, 6 deletions
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 09f057375..dbff3e0db 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -339,7 +339,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 ()) {
@@ -811,11 +813,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);