From 299e6940cd0e63d576787ba9fc1b780c92c2e041 Mon Sep 17 00:00:00 2001 From: Taras Zaporozhets Date: Sun, 30 Oct 2022 18:17:51 +0100 Subject: [PATCH] Improve ABI --- include/sdbus-c++/IConnection.h | 9 +++++---- src/Connection.cpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/sdbus-c++/IConnection.h b/include/sdbus-c++/IConnection.h index 3d091df..29c369c 100644 --- a/include/sdbus-c++/IConnection.h +++ b/include/sdbus-c++/IConnection.h @@ -64,10 +64,6 @@ namespace sdbus { */ struct PollData { - /*! - * The read fd to be monitored by the event loop. - */ - int event_fd; /*! * The read fd to be monitored by the event loop. */ @@ -82,6 +78,11 @@ namespace sdbus { */ uint64_t timeout_usec; + /*! + * The read fd to be monitored by the event loop. + */ + int event_fd; + /*! * Get the event poll timeout. * diff --git a/src/Connection.cpp b/src/Connection.cpp index b901a09..afa44f8 100644 --- a/src/Connection.cpp +++ b/src/Connection.cpp @@ -146,7 +146,7 @@ Connection::PollData Connection::getEventLoopPollData() const auto r = iface_->sd_bus_get_poll_data(bus_.get(), &pollData); SDBUS_THROW_ERROR_IF(r < 0, "Failed to get bus poll data", -r); - return {eventFd_.fd, pollData.fd, pollData.events, pollData.timeout_usec}; + return {pollData.fd, pollData.events, pollData.timeout_usec, eventFd_.fd}; } const ISdBus& Connection::getSdBusInterface() const