mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
GSimpleAsyncResult: add error-taking variants
Add g_simple_async_result_new_take_error and g_simple_async_result_take_error, which take over ownership of the given error. Based on a patch by Christian Persch. https://bugzilla.gnome.org/show_bug.cgi?id=629247
This commit is contained in:
@@ -60,6 +60,10 @@ GSimpleAsyncResult *g_simple_async_result_new_error (GObject
|
||||
const char *format,
|
||||
...) G_GNUC_PRINTF (6, 7);
|
||||
GSimpleAsyncResult *g_simple_async_result_new_from_error (GObject *source_object,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data,
|
||||
const GError *error);
|
||||
GSimpleAsyncResult *g_simple_async_result_new_take_error (GObject *source_object,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data,
|
||||
GError *error);
|
||||
@@ -90,6 +94,8 @@ void g_simple_async_result_run_in_thread (GSimpleAsyncResult
|
||||
GCancellable *cancellable);
|
||||
void g_simple_async_result_set_from_error (GSimpleAsyncResult *simple,
|
||||
const GError *error);
|
||||
void g_simple_async_result_take_error (GSimpleAsyncResult *simple,
|
||||
GError *error);
|
||||
gboolean g_simple_async_result_propagate_error (GSimpleAsyncResult *simple,
|
||||
GError **dest);
|
||||
void g_simple_async_result_set_error (GSimpleAsyncResult *simple,
|
||||
|
Reference in New Issue
Block a user