summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-05-31 16:04:29 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-09-27 15:32:00 +0100
commit83471e869e464c63063e9e254bc8c40b25de03b7 (patch)
tree5574273c75975af0605864ca464726a1c4230aff
parentc6aa1d7dbdf04501495e4a3b4cfe6e7d808af6dd (diff)
DBusGProxy: be more pedantic about boolean returns
Returning false doesn't strictly imply that the error is set; if you're being pedantic enough, it's really a tri-state where TRUE indicates success, FALSE indicates failure, and calling the function incorrectly results in undefined behaviour (currently a critical warning and returning FALSE). Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37793 Bug-NB: NB#218973
-rw-r--r--dbus/dbus-gproxy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/dbus/dbus-gproxy.c b/dbus/dbus-gproxy.c
index 5d642f5..6af93ba 100644
--- a/dbus/dbus-gproxy.c
+++ b/dbus/dbus-gproxy.c
@@ -2653,14 +2653,14 @@ dbus_g_proxy_begin_call_with_timeout (DBusGProxy *proxy,
* case this function will block if the results haven't yet been
* received.
*
- * If the call results in an error, the error is set as normal for
- * GError and the function returns #FALSE.
+ * All D-Bus method calls can fail with a remote error. If this occurs,
+ * the @error will be set and this function will return %FALSE.
*
* Otherwise, the "out" parameters and return value of the
* method are stored in the provided varargs list.
* The list should be terminated with G_TYPE_INVALID.
*
- * Returns: #FALSE if an error is set.
+ * Returns: %TRUE on success
*/
gboolean
dbus_g_proxy_end_call (DBusGProxy *proxy,
@@ -2703,7 +2703,7 @@ dbus_g_proxy_end_call (DBusGProxy *proxy,
* It is an error to call this method on a proxy that has emitted
* the #DBusGProxy::destroy signal.
*
- * Returns: #FALSE if an error is set, #TRUE otherwise.
+ * Returns: %TRUE if the method succeeds, %FALSE if it fails
*/
gboolean
dbus_g_proxy_call (DBusGProxy *proxy,
@@ -2763,7 +2763,7 @@ dbus_g_proxy_call (DBusGProxy *proxy,
* It is an error to call this method on a proxy that has emitted
* the #DBusGProxy::destroy signal.
*
- * Returns: #FALSE if an error is set, #TRUE otherwise.
+ * Returns: %TRUE if the method succeeds, %FALSE if it fails
*/
gboolean
dbus_g_proxy_call_with_timeout (DBusGProxy *proxy,