summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-07-09 10:40:41 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-07-09 10:44:04 +0200
commit839b6dbba9a6e4f08ddc2ae6d2b2b260d76f7c74 (patch)
tree647b16ec3160c269516056e1663b822fb4407e4e /src
parenta0f7095171f03517bb44f91c67098ddd53537b54 (diff)
sd-bus: sd_bus_slot_get_description() should return const strings
All other *_get_description() functions use 'const char**', so make sure sd_bus_slot_get_description() does the same. This changes API, but ABI stays stable. I think this is fine, but I wouldn't mind bumping SONAME. Reported in #528.
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/sd-bus/bus-slot.c2
-rw-r--r--src/systemd/sd-bus.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/bus-slot.c b/src/libsystemd/sd-bus/bus-slot.c
index c452477566..b149ea16da 100644
--- a/src/libsystemd/sd-bus/bus-slot.c
+++ b/src/libsystemd/sd-bus/bus-slot.c
@@ -273,7 +273,7 @@ _public_ int sd_bus_slot_set_description(sd_bus_slot *slot, const char *descript
return free_and_strdup(&slot->description, description);
}
-_public_ int sd_bus_slot_get_description(sd_bus_slot *slot, char **description) {
+_public_ int sd_bus_slot_get_description(sd_bus_slot *slot, const char **description) {
assert_return(slot, -EINVAL);
assert_return(description, -EINVAL);
assert_return(slot->description, -ENXIO);
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index f34893171f..5439a1903b 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -205,7 +205,7 @@ sd_bus* sd_bus_slot_get_bus(sd_bus_slot *slot);
void *sd_bus_slot_get_userdata(sd_bus_slot *slot);
void *sd_bus_slot_set_userdata(sd_bus_slot *slot, void *userdata);
int sd_bus_slot_set_description(sd_bus_slot *slot, const char *description);
-int sd_bus_slot_get_description(sd_bus_slot *slot, char **description);
+int sd_bus_slot_get_description(sd_bus_slot *slot, const char **description);
sd_bus_message* sd_bus_slot_get_current_message(sd_bus_slot *slot);
sd_bus_message_handler_t sd_bus_slot_get_current_handler(sd_bus_slot *bus);