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 662371 - Gio::DBus::Connection: Add call_[finish|sync]() with UnixFDLists.
Gio::DBus::Connection: Add call_[finish|sync]() with UnixFDLists.
Status: RESOLVED FIXED
Product: glibmm
Classification: Bindings
Component: giomm
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on: 651523
Blocks:
 
 
Reported: 2011-10-21 06:44 UTC by José Alburquerque
Modified: 2012-10-05 20:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add the Gio::DBus::Connection::call_[finish|sync]() methods. (3.91 KB, patch)
2011-10-21 06:44 UTC, José Alburquerque
none Details | Review
Patch to allow setting C++ output parameters from C function output parameters (32.14 KB, patch)
2012-09-18 04:30 UTC, José Alburquerque
committed Details | Review
Updated patch to add the Gio::DBus::Connection::call_[finish|sync]() methods. (8.75 KB, patch)
2012-09-18 04:41 UTC, José Alburquerque
none Details | Review
Updated patch to add the Gio::DBus::Connection::call_[finish|sync]() methods. (8.75 KB, patch)
2012-09-18 04:45 UTC, José Alburquerque
none Details | Review
Patch to revert the git commit adding the methods. (12.14 KB, patch)
2012-09-18 06:23 UTC, José Alburquerque
committed Details | Review
Updated patch to add the Gio::DBus::Connection::call_[finish|sync]() methods. (13.75 KB, patch)
2012-09-18 06:25 UTC, José Alburquerque
committed Details | Review

Description José Alburquerque 2011-10-21 06:44:22 UTC
Created attachment 199617 [details] [review]
Patch to add the  Gio::DBus::Connection::call_[finish|sync]() methods.

This patch adds the mentioned methods using the new output parameter functionality in gmmproc, thus it depends on the relevant bug.
Comment 1 Murray Cumming 2012-09-17 20:31:37 UTC
It looks like I have not noticed this patch for ages, and I just committed an inferior commit to add these methods yesterday.

However, when I revert my commit
http://git.gnome.org/browse/glibmm/commit/?id=edca3b3b3da20baf9d79b4820a02bc15a08c207f
and try to apply your patch, I get this gmmproc error:

dbusconnection.hg:793: fail to parse Glib::VariantContainerBase call_finish(const Glib::RefPtr<AsyncResult>& res{.}, Glib::RefPtr<UnixFDList>& out_fd_list{.>>}), g_dbus_connection_call_with_unix_fd_list_finish, errthrow
Use of uninitialized value $_ in substitution (s///) at ../../tools/pm/Util.pm line 63.
Use of uninitialized value $_ in substitution (s///) at ../../tools/pm/Util.pm line 64.
Use of uninitialized value $argCFunctionName in pattern match (m//) at ../../tools/pm/WrapParser.pm line 884.
Use of uninitialized value $functionName in hash element at ../../tools/pm/DocsParser.pm line 241.
Can't call method "get_return_type_for_methods" on unblessed reference at ../../tools/pm/Output.pm line 395.
make[2]: *** [.stamps/dbusconnection.stamp] Error 255
make[2]: *** Deleting file `.stamps/dbusconnection.stamp'
make[2]: Leaving directory `/home/murrayc/checkout/gnome/glibmm/gio/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/murrayc/checkout/gnome/glibmm'
Comment 2 José Alburquerque 2012-09-18 04:30:07 UTC
Created attachment 224571 [details] [review]
Patch to allow setting C++ output parameters from C function output parameters

Yes.  The reason is that the bug that was in progress (bug #651523) adding new functionality to handle setting C++ output parameters from C function output parameters crashed so it was not possible to get that functionality in gmmproc easily.  This attached patch from the crashed bug would be necessary for the patch that adds the new methods to work correctly.
Comment 3 José Alburquerque 2012-09-18 04:41:33 UTC
Created attachment 224572 [details] [review]
Updated patch to add the  Gio::DBus::Connection::call_[finish|sync]() methods.
Comment 4 José Alburquerque 2012-09-18 04:45:48 UTC
Created attachment 224573 [details] [review]
Updated patch to add the  Gio::DBus::Connection::call_[finish|sync]() methods.
Comment 5 José Alburquerque 2012-09-18 04:47:16 UTC
I updated the original patch adding the methods against the latest git sources.
Comment 6 José Alburquerque 2012-09-18 04:49:40 UTC
Comment on attachment 224572 [details] [review]
Updated patch to add the  Gio::DBus::Connection::call_[finish|sync]() methods.

For some reason the patch was added twice (browser trouble).  Marking this one obsolete to avoid confusion.
Comment 7 José Alburquerque 2012-09-18 06:22:26 UTC
I think you meant to revert the commit that adds the methods in git and then apply the patch that adds the methods in this bug.  Sorry.  The following patches do that.
Comment 8 José Alburquerque 2012-09-18 06:23:12 UTC
Created attachment 224574 [details] [review]
Patch to revert the git commit adding the methods.
Comment 9 José Alburquerque 2012-09-18 06:25:21 UTC
Created attachment 224575 [details] [review]
Updated patch to add the Gio::DBus::Connection::call_[finish|sync]() methods.
Comment 10 Murray Cumming 2012-09-18 07:21:42 UTC
Thanks. Please feel free to push this.
Comment 12 Murray Cumming 2012-09-25 19:57:22 UTC
It's not terribly important, but I noticed that the new >> output-parameter feature doesn't work with Something* parameters (rather than the Something** parameters here).

For instance, if I try:

#m4 _INITIALIZATION(`Gdk::Rectangle&',`GdkRectangle', `$3 = Glib::wrap(&($4))')

  _WRAP_METHOD(bool get_cell_rect(const TreeModel::Path& path, const CellRenderer& cell{?}, Gdk::Rectangle& rect{.>>}) const, gtk_icon_view_get_cell_rect)

Then the compilation fails because of this generated line:
  GdkRectangle g_rect = 0;
Comment 13 José Alburquerque 2012-09-26 04:28:05 UTC
I think the following commit in glibmm should fix this:
http://git.gnome.org/browse/glibmm/commit/?id=e06484cfd320798bad86ae4363242dab4d7d644a

I'm assuming initializing the C object is wise so I use an assignment to a "default constructed" object to initialize the C object.
Comment 14 José Alburquerque 2012-10-05 20:47:38 UTC
I think this bug is fixed so closing.