[glib] g_simple_async_report_error_in_idle with no object
- From: Christian Dywan <cdywan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] g_simple_async_report_error_in_idle with no object
- Date: Fri, 17 Dec 2010 16:41:04 +0000 (UTC)
commit ddc126cf2cbbdbc3a98e7bd397f19fb0ac8c27c4
Author: Christian Dywan <christian twotoasts de>
Date: Fri Dec 10 15:07:04 2010 +0100
g_simple_async_report_error_in_idle with no object
Document and allow passing of NULL for the object consistently to
_take_error and _report_error functions.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=636673
gio/gsimpleasyncresult.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/gio/gsimpleasyncresult.c b/gio/gsimpleasyncresult.c
index db44600..458cf2e 100644
--- a/gio/gsimpleasyncresult.c
+++ b/gio/gsimpleasyncresult.c
@@ -299,8 +299,7 @@ g_simple_async_result_init (GSimpleAsyncResult *simple)
/**
* g_simple_async_result_new:
- * @source_object: a #GObject the asynchronous function was called with,
- * or %NULL.
+ * @source_object: (allow-none): a #GObject, or %NULL.
* @callback: a #GAsyncReadyCallback.
* @user_data: user data passed to @callback.
* @source_tag: the asynchronous function.
@@ -333,7 +332,7 @@ g_simple_async_result_new (GObject *source_object,
/**
* g_simple_async_result_new_from_error:
- * @source_object: a #GObject, or %NULL.
+ * @source_object: (allow-none): a #GObject, or %NULL.
* @callback: a #GAsyncReadyCallback.
* @user_data: user data passed to @callback.
* @error: a #GError
@@ -394,7 +393,7 @@ g_simple_async_result_new_take_error (GObject *source_object,
/**
* g_simple_async_result_new_error:
- * @source_object: a #GObject, or %NULL.
+ * @source_object: (allow-none): a #GObject, or %NULL.
* @callback: a #GAsyncReadyCallback.
* @user_data: user data passed to @callback.
* @domain: a #GQuark.
@@ -935,7 +934,7 @@ g_simple_async_result_is_valid (GAsyncResult *result,
/**
* g_simple_async_report_error_in_idle:
- * @object: a #GObject.
+ * @object: (allow-none): a #GObject, or %NULL.
* @callback: a #GAsyncReadyCallback.
* @user_data: user data passed to @callback.
* @domain: a #GQuark containing the error domain (usually #G_IO_ERROR).
@@ -959,7 +958,7 @@ g_simple_async_report_error_in_idle (GObject *object,
GSimpleAsyncResult *simple;
va_list args;
- g_return_if_fail (G_IS_OBJECT (object));
+ g_return_if_fail (!object || G_IS_OBJECT (object));
g_return_if_fail (domain != 0);
g_return_if_fail (format != NULL);
@@ -1006,7 +1005,7 @@ g_simple_async_report_gerror_in_idle (GObject *object,
/**
* g_simple_async_report_take_gerror_in_idle:
- * @object: a #GObject.
+ * @object: (allow-none): a #GObject, or %NULL
* @callback: a #GAsyncReadyCallback.
* @user_data: user data passed to @callback.
* @error: the #GError to report
@@ -1025,7 +1024,7 @@ g_simple_async_report_take_gerror_in_idle (GObject *object,
{
GSimpleAsyncResult *simple;
- g_return_if_fail (G_IS_OBJECT (object));
+ g_return_if_fail (!object || G_IS_OBJECT (object));
g_return_if_fail (error != NULL);
simple = g_simple_async_result_new_take_error (object,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]