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 708297 - Support for async-scoped "progress" type callbacks
Support for async-scoped "progress" type callbacks
Status: RESOLVED DUPLICATE of bug 616044
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-09-18 14:27 UTC by Allison Karlitskaya (desrt)
Modified: 2015-02-07 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Allison Karlitskaya (desrt) 2013-09-18 14:27:27 UTC
We have a few APIs in GIO now, particularly on GFile that are unbindable.  For example:

void g_file_copy_async (GFile                 *source,
                        GFile                 *destination,
                        GFileCopyFlags         flags,
                        int                    io_priority,
                        GCancellable          *cancellable,
                        GFileProgressCallback  progress_callback,
                        gpointer               progress_callback_data,
                        GAsyncReadyCallback    callback,
                        gpointer               user_data);

and the new:

g_file_measure_disk_usage_async (GFile                        *file,
                                 GFileMeasureFlags             flags,
                                 gint                          io_priority,
                                 GCancellable                 *cancellable,
                                 GFileMeasureProgressCallback  progress_callback,
                                 gpointer                      progress_data,
                                 GAsyncReadyCallback           callback,
                                 gpointer                      user_data);

These are unbindable because the scope of the progress_data argument is weird.  To a C programmer, it's very clear that you will get progress callbacks until the async operation is complete, at which point they will stop.  We should teach gobject-introspection about this by way of some sort of (scope asynccall) annotation.

ie: the progress_data will be freed at the same time as the user_data that was marked (scope async) -- when the async call is delivered.
Comment 1 Simon Feltman 2014-05-04 21:57:51 UTC

*** This bug has been marked as a duplicate of bug 616044 ***
Comment 2 André Klapper 2015-02-07 16:49:22 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]