[glibmm] DBus::Connection::signal_subscribe(): Pass nullptr instead of "".
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] DBus::Connection::signal_subscribe(): Pass nullptr instead of "".
- Date: Mon, 21 Sep 2015 06:45:07 +0000 (UTC)
commit ece1463f6d796c7c74da1e9d37a4e69904a9706e
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Sep 21 08:44:05 2015 +0200
DBus::Connection::signal_subscribe(): Pass nullptr instead of "".
Because that's what the C documentation requires, and the implementation
doesn't accept "" to mean the same thing, though that would be
convenient:
https://developer.gnome.org/gio/stable/GDBusConnection.html#g-dbus-connection-signal-subscribe
Noticed by Christof Meerwald on gtkmm-list.
gio/src/dbusconnection.ccg | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gio/src/dbusconnection.ccg b/gio/src/dbusconnection.ccg
index 0e9faf6..935a5d6 100644
--- a/gio/src/dbusconnection.ccg
+++ b/gio/src/dbusconnection.ccg
@@ -807,8 +807,12 @@ guint Connection::signal_subscribe(
{
auto slot_copy = new SlotSignal(slot);
- return g_dbus_connection_signal_subscribe(gobj(), sender.c_str(),
- interface_name.c_str(), member.c_str(), object_path.c_str(), arg0.c_str(),
+ return g_dbus_connection_signal_subscribe(gobj(),
+ (sender.empty() ? nullptr : sender.c_str()),
+ (interface_name.empty() ? nullptr : interface_name.c_str()),
+ (member.empty() ? nullptr : member.c_str()),
+ (object_path.empty() ? nullptr : object_path.c_str()),
+ (arg0.empty() ? nullptr : arg0.c_str()),
static_cast<GDBusSignalFlags>(flags),
&DBusConnection_Signal_giomm_callback, slot_copy,
&DBusConnection_Signal_giomm_callback_destroy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]