1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00

Merge pull request #20339 from poettering/bus-vtable-indent-fix

sd-bus: fix indentation in macros
This commit is contained in:
Lennart Poettering 2021-07-29 10:46:50 +02:00 committed by GitHub
commit 78d4d37401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,7 +76,10 @@ struct sd_bus_vtable {
const unsigned *vtable_format_reference;
} start;
struct {
size_t reserved;
/* This field exists only to make sure we have something to initialize in
* SD_BUS_VTABLE_END in a way that is both compatible with pedantic versions of C and
* C++. It's unused otherwise. */
size_t _reserved;
} end;
struct {
const char *member;
@ -106,11 +109,11 @@ struct sd_bus_vtable {
.type = _SD_BUS_VTABLE_START, \
.flags = _flags, \
.x = { \
.start = { \
.element_size = sizeof(sd_bus_vtable), \
.features = _SD_BUS_VTABLE_PARAM_NAMES, \
.vtable_format_reference = &sd_bus_object_vtable_format, \
}, \
.start = { \
.element_size = sizeof(sd_bus_vtable), \
.features = _SD_BUS_VTABLE_PARAM_NAMES, \
.vtable_format_reference = &sd_bus_object_vtable_format, \
}, \
}, \
}
@ -122,14 +125,14 @@ struct sd_bus_vtable {
.type = _SD_BUS_VTABLE_METHOD, \
.flags = _flags, \
.x = { \
.method = { \
.member = _member, \
.signature = _signature, \
.result = _result, \
.handler = _handler, \
.offset = _offset, \
.names = _in_names _out_names, \
}, \
.method = { \
.member = _member, \
.signature = _signature, \
.result = _result, \
.handler = _handler, \
.offset = _offset, \
.names = _in_names _out_names, \
}, \
}, \
}
#define SD_BUS_METHOD_WITH_OFFSET(_member, _signature, _result, _handler, _offset, _flags) \
@ -144,14 +147,14 @@ struct sd_bus_vtable {
.type = _SD_BUS_VTABLE_SIGNAL, \
.flags = _flags, \
.x = { \
.signal = { \
.member = _member, \
.signature = _signature, \
.names = _out_names, \
}, \
.signal = { \
.member = _member, \
.signature = _signature, \
.names = _out_names, \
}, \
}, \
}
#define SD_BUS_SIGNAL(_member, _signature, _flags) \
}
#define SD_BUS_SIGNAL(_member, _signature, _flags) \
SD_BUS_SIGNAL_WITH_NAMES(_member, _signature, "", _flags)
#define SD_BUS_PROPERTY(_member, _signature, _get, _offset, _flags) \
@ -159,13 +162,13 @@ struct sd_bus_vtable {
.type = _SD_BUS_VTABLE_PROPERTY, \
.flags = _flags, \
.x = { \
.property = { \
.member = _member, \
.signature = _signature, \
.get = _get, \
.set = NULL, \
.offset = _offset, \
}, \
.property = { \
.member = _member, \
.signature = _signature, \
.get = _get, \
.set = NULL, \
.offset = _offset, \
}, \
}, \
}
@ -174,13 +177,13 @@ struct sd_bus_vtable {
.type = _SD_BUS_VTABLE_WRITABLE_PROPERTY, \
.flags = _flags, \
.x = { \
.property = { \
.member = _member, \
.signature = _signature, \
.get = _get, \
.set = _set, \
.offset = _offset, \
}, \
.property = { \
.member = _member, \
.signature = _signature, \
.get = _get, \
.set = _set, \
.offset = _offset, \
}, \
}, \
}
@ -189,9 +192,9 @@ struct sd_bus_vtable {
.type = _SD_BUS_VTABLE_END, \
.flags = 0, \
.x = { \
.end = { \
.reserved = 0, \
}, \
.end = { \
._reserved = 0, \
}, \
}, \
}