[vala/0.38] vala: Include sender-type parameter to prototype-string of signal-delegates
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.38] vala: Include sender-type parameter to prototype-string of signal-delegates
- Date: Wed, 29 Nov 2017 16:19:44 +0000 (UTC)
commit 2ac63a8f0d80cfba5a33c2be38cc1dd0ad8d32af
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Sep 10 15:48:53 2017 +0200
vala: Include sender-type parameter to prototype-string of signal-delegates
https://bugzilla.gnome.org/show_bug.cgi?id=787521
vala/valacallabletype.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/vala/valacallabletype.vala b/vala/valacallabletype.vala
index 1646b44..0642fa6 100644
--- a/vala/valacallabletype.vala
+++ b/vala/valacallabletype.vala
@@ -44,6 +44,15 @@ public abstract class Vala.CallableType : DataType {
// Append parameter-list
builder.append_c ('(');
int i = 1;
+ // add sender parameter for internal signal-delegates
+ var delegate_type = this as DelegateType;
+ if (delegate_type != null) {
+ var delegate_symbol = delegate_type.delegate_symbol;
+ if (delegate_symbol.parent_symbol is Signal && delegate_symbol.sender_type != null) {
+ builder.append (delegate_symbol.sender_type.to_qualified_string ());
+ i++;
+ }
+ }
foreach (Parameter param in get_parameters ()) {
if (i > 1) {
builder.append (", ");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]