After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 705461 - handler id is not retrievable when connecting dynamic signals
handler id is not retrievable when connecting dynamic signals
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Code Generator
0.21.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2013-08-04 20:23 UTC by Rico Tzschichholz
Modified: 2013-10-04 12:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix connect/disconnect-of dynamic signals (1.75 KB, patch)
2013-08-04 20:23 UTC, Rico Tzschichholz
committed Details | Review

Description Rico Tzschichholz 2013-08-04 20:23:30 UTC
Created attachment 250818 [details] [review]
Fix connect/disconnect-of dynamic signals

The following snippet generates false c-code while the dynamic-connect-wrapper doesnt have a return value.

class Foo : Object
{
}

void callback () {
}

void main ()
{
	dynamic Foo foo = new Foo ();
	var id = foo.hidden.connect (callback);
	foo.disconnect (id);
}
Comment 1 Luca Bruno 2013-08-05 07:34:23 UTC
Review of attachment 250818 [details] [review]:

Looks good, thanks.
Comment 2 Rico Tzschichholz 2013-08-07 18:24:25 UTC
Review of attachment 250818 [details] [review]:

commit 5a09c0ab8eb99bfc9926b338cdfe399c6ff87924
Author: Rico Tzschichholz <ricotz@ubuntu.com>
Date:   Sun Aug 4 22:27:21 2013 +0200

    codegen: Fix connect/disconnect of dynamic signals
    
    Make dynamic wrapper function return handler id for later
    disconnect.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705461