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 690684 - DBus VTable delegates require _target
DBus VTable delegates require _target
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Bindings: GLib
0.18.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-23 21:57 UTC by Reiner Merk
Modified: 2018-05-22 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
'has_target = false' and add a user_data void pointer to VTable delegates (37.18 KB, patch)
2012-12-23 21:57 UTC, Reiner Merk
none Details | Review
Removed .vapi part from previous patch as it is generated (3.77 KB, patch)
2013-04-29 09:49 UTC, Reiner Merk
none Details | Review

Description Reiner Merk 2012-12-23 21:57:48 UTC
Created attachment 232161 [details] [review]
'has_target = false' and add a user_data void pointer to VTable delegates

Using DBus VTable delegates will cause cause compile errors like

error: ‘GDBusSubtreeVTable’ has no member named ‘dispatch_target’

for DBusSubtreeDispatchFunc.

The attached patch will add CCode 'has_target = false' and add a user_data void pointer for user data transfer to the following delegates:

DBusSubtreeEnumerateFunc
DBusSubtreeIntrospectFunc
DBusSubtreeDispatchFunc

DBusInterfaceMethodCallFunc
DBusInterfaceGetPropertyFunc
DBusInterfaceSetPropertyFunc

nemequ assured me that no other part of vala depends on the current signatures of those delegates.
Comment 1 Reiner Merk 2013-04-29 09:49:03 UTC
Created attachment 242783 [details] [review]
Removed .vapi part from previous patch as it is generated
Comment 2 Luca Bruno 2013-05-02 07:49:14 UTC
Thanks for your patch. It's correct that the delegate itself has a target, but it doesn't have the target in the struct.
What about putting CCode (delegate_target = false) on top of the struct fields, like for GLib.MarkupParser?
I'd probably like more your approach because it allows retrieving the user_data though.

Also please provide the changed .vapi in the patch.
Comment 3 Reiner Merk 2013-05-02 14:11:05 UTC
To be honest with you, I don't even understand what 'target' means. I was discussing on irc #vala how to achieve it that I can use user_data (like I would using C) and I was asked to put my findings into a bug.

I had a look at MarkupParser but as you rightly noted: It doesn't give me user_data.

I had the .vapi in the obsoleted patch, however, the changes in the metadata lead to so many other changes on my system that I thought it counter-intuitive to incluse the .vapi changes.  But if you want me to make the obsoleted patch the valid one: no problem.
Comment 4 Luca Bruno 2013-05-02 14:14:10 UTC
The target is the user_data. Vala smartly uses it to automatically manage user_data for you, so we have to decide whether to let vala do automatically what it can or not.
In this situation, we probably want user_data to be accessible manually.

Ok don't include the .vapi, your system .gir is out of date maybe.
Comment 5 GNOME Infrastructure Team 2018-05-22 14:38:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/344.