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 639059 - Can't use owned delegate parameter in delegate
Can't use owned delegate parameter in delegate
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Delegates
unspecified
Other Linux
: Urgent critical
: ---
Assigned To: Vala maintainers
Vala maintainers
invalid-c-code test-case
Depends on:
Blocks:
 
 
Reported: 2011-01-09 12:48 UTC by Luca Bruno
Modified: 2011-01-09 13:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Support owned delegate parameters in delegates. (1.61 KB, patch)
2011-01-09 12:58 UTC, Luca Bruno
none Details | Review

Description Luca Bruno 2011-01-09 12:48:26 UTC
Hello,
I'm trying to use an owned delegate parameter inside a delegate and the destroy_notify parameter is not generated.

public delegate void Deleg (owned Deleg d);

void main() {
}

Generated C code is:
typedef void (*Deleg) (GCallback d, void* d_target, void* user_data);

It should be
typedef void (*Deleg) (GCallback d, void* d_target, GDestroyNotify d_target_destroy_notify, void* user_data);
Comment 1 Luca Bruno 2011-01-09 12:58:40 UTC
Created attachment 177870 [details] [review]
Support owned delegate parameters in delegates.

Fixes bug 639059.
Comment 2 Jürg Billeter 2011-01-09 13:09:22 UTC
commit cb97c1e59acf6dbef9236c75240fb356bfd2afaf
Author: Luca Bruno <lucabru@src.gnome.org>
Date:   Sun Jan 9 13:57:59 2011 +0100

    Support owned delegate parameters in delegates.
    
    Fixes bug 639059.