Merge ~kondor-dani/compiz:dbus-bool-fix into compiz:master

Proposed by Daniel Kondor
Status: Merged
Approved by: Dmitry Shachnev
Approved revision: 7945c64ec834120b156f16fc15ebfa9a5857a1f7
Merged at revision: 71ffc5dff978e86c9024263c67f748a298c42e80
Proposed branch: ~kondor-dani/compiz:dbus-bool-fix
Merge into: compiz:master
Diff against target: 83 lines (+12/-12)
1 file modified
plugins/dbus/src/dbus.cpp (+12/-12)
Reviewer Review Type Date Requested Status
Alberts Muktupāvels Approve
Review via email: mp+384378@code.launchpad.net

This proposal supersedes a proposal from 2020-05-21.

Commit message

Use dbus_bool_t instead of bool.

Description of the change

Needs to use dbus_bool_t instead of bool.

To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) : Posted in a previous version of this proposal
Revision history for this message
Alberts Muktupāvels (muktupavels) : Posted in a previous version of this proposal
Revision history for this message
Alberts Muktupāvels (muktupavels) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/plugins/dbus/src/dbus.cpp b/plugins/dbus/src/dbus.cpp
2index fd322b2..e390534 100644
3--- a/plugins/dbus/src/dbus.cpp
4+++ b/plugins/dbus/src/dbus.cpp
5@@ -495,7 +495,7 @@ DbusScreen::handleActionMessage (DBusConnection *connection,
6 switch (dbus_message_iter_get_arg_type (&iter)) {
7 case DBUS_TYPE_BOOLEAN:
8 {
9- bool tmp;
10+ dbus_bool_t tmp;
11 type = CompOption::TypeBool;
12 dbus_message_iter_get_basic (&iter, &tmp);
13 value.set (tmp ? true : false);
14@@ -602,7 +602,7 @@ DbusScreen::getOptionValue (DBusMessageIter *iter,
15 switch (type) {
16 case CompOption::TypeBool:
17 {
18- bool b;
19+ dbus_bool_t b;
20 success = tryGetValueWithType (iter, DBUS_TYPE_BOOLEAN, &b);
21 if (success)
22 value.set (b ? true : false);
23@@ -682,8 +682,8 @@ DbusScreen::getOptionValue (DBusMessageIter *iter,
24 break;
25 case CompOption::TypeBell:
26 {
27- bool bell;
28- CompAction action;
29+ dbus_bool_t bell;
30+ CompAction action;
31
32 success = tryGetValueWithType (iter, DBUS_TYPE_BOOLEAN, &bell);
33 if (success)
34@@ -818,7 +818,7 @@ DbusScreen::appendSimpleOptionValue (DBusMessage *message,
35 switch (type) {
36 case CompOption::TypeBool:
37 {
38- bool b = value.b () ? true : false;
39+ dbus_bool_t b = value.b () ? TRUE : FALSE;
40 dbus_message_append_args (message,
41 DBUS_TYPE_BOOLEAN, &b,
42 DBUS_TYPE_INVALID);
43@@ -887,7 +887,7 @@ DbusScreen::appendSimpleOptionValue (DBusMessage *message,
44 break;
45 case CompOption::TypeBell:
46 {
47- bool bell = value.action ().bell () ? true : false;
48+ dbus_bool_t bell = value.action ().bell () ? TRUE : FALSE;
49 dbus_message_append_args (message,
50 DBUS_TYPE_BOOLEAN, &bell,
51 DBUS_TYPE_INVALID);
52@@ -955,7 +955,7 @@ DbusScreen::appendListOptionValue (DBusMessage *message,
53 break;
54 case CompOption::TypeBool:
55 {
56- bool b = val.b () ? true : false;
57+ dbus_bool_t b = val.b () ? TRUE : FALSE;
58 dbus_message_iter_append_basic (&listIter, sig[0], &b);
59 }
60 break;
61@@ -1274,17 +1274,17 @@ DbusScreen::handleGetPluginMetadataMessage (DBusConnection *connection,
62
63 if (p)
64 {
65- bool initializedPlugin = true;
66- char *shortDesc = NULL;
67- char *longDesc = NULL;
68- const char *blankStr = "";
69+ dbus_bool_t initializedPlugin = TRUE;
70+ char *shortDesc = NULL;
71+ char *longDesc = NULL;
72+ const char *blankStr = "";
73
74 reply = dbus_message_new_method_return (message);
75
76 if (loadedPlugin)
77 {
78 if (!(*p->vTable->init) (p))
79- initializedPlugin = false;
80+ initializedPlugin = FALSE;
81 }
82
83 if (initializedPlugin && p->vTable->getMetadata)

Subscribers

People subscribed via source and target branches