From be63003e3f1841b43614f0e11b0a291e11f1dad1 Mon Sep 17 00:00:00 2001 From: José Bollo Date: Fri, 22 Sep 2017 09:37:54 +0200 Subject: Provide conversions for afb_event and afb_req MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Provision is made here to convert, trivially: afb_event -> afb_eventid* afb_req -> afb_request* The opposite conversions aren't provided to favor new interfaces. Change-Id: Ib67c2317f782e2edfd1ba0e49e10b321a3b770a3 Signed-off-by: José Bollo --- include/afb/afb-event.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/afb/afb-event.h') diff --git a/include/afb/afb-event.h b/include/afb/afb-event.h index c3686fdd..2e7f6ab9 100644 --- a/include/afb/afb-event.h +++ b/include/afb/afb-event.h @@ -28,6 +28,14 @@ struct afb_event struct afb_eventid *closure; /* the closure argument for functions of 'itf' */ }; +/* + * Converts the 'event' to an afb_eventid. + */ +static inline struct afb_eventid *afb_event_to_eventid(struct afb_event event) +{ + return event.closure; +} + /* * Checks wether the 'event' is valid or not. * -- cgit 1.2.3-korg